要特判我知道,但我不知道怎么改啊【蒟蒻】
查看原帖
要特判我知道,但我不知道怎么改啊【蒟蒻】
778802
Xssion37_XY楼主2023/3/20 22:01
#include <iostream>
using namespace std;
int main(){
	int a,b,c,d,f;
	cin>>a>>b>>c;
	for(f = 1;f <= c;f ++){
		a *= 10;
		d = a/b;
		a %= b;
	}
	if(a == 1 and b == 1 and c == 1){
		cout<<0;
		return 0;
	}
	else{
		cout<<d<<endl;
	}	
	return 0;
}
悬赏:关注
2023/3/20 22:01
加载中...