一直AC不了,卡90分了
查看原帖
一直AC不了,卡90分了
1446766
liutongyu2015楼主2025/2/3 11:31

卡90分了,我到底错在哪里

#include <iostream>
using namespace std;
int main()
{
    double a,b;
    long long c;
    cin >> a >> b >> c;
    double w=a/b;
    if (a==b) cout << 0;
    else
    {
        for (int i=1;i<c;i++)
        {
            w*=10;
            w=w-int(w);
        }
        int ww=w*=10;
        printf("%d\n",ww);
    }
}
2025/2/3 11:31
加载中...