Codeforces Round #450 (Div. 2) B
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int k=0,i;
for(int j=1;j<=100000;j++){
if(a*10<b&&a!=0){
i=0;
a=a*10;
}
else{
a=a*10;
i=a/b;
a=a%b;
}
//cout<<a<<" "<<i<<endl;
if(i==c){
cout<<j<<endl;
return 0;
}
}
cout<<"-1"<<endl;
return 0;
}
相關文章
- Codeforces Round #448 (Div. 2)B
- Codeforces Round #251 (Div. 2) A/B/D
- codeforces Educational Codeforces Round 33 (Rated for Div. 2)B
- Codeforces Round #362 (Div. 2) B 模擬
- Codeforces Round #336 (Div. 2) B 暴力
- Codeforces Round #325 (Div. 2) B 遞推
- Codeforces Round #290 (Div. 2) A,B,C,D
- Codeforces Round #245 (Div. 2) B - Balls GameGAM
- Codeforces Round 977 (Div. 2)(B-C2)
- Codeforces Round #491 (Div. 2) B. Getting an A
- Codeforces Round #361 (Div. 2) B BFS最短路
- Codeforces Round #323 (Div. 2) B 模擬
- Codeforces Round #321 (Div. 2) B 二分
- Codeforces Round #288 (Div. 2) A,B,C,D,E
- Codeforces Round #287 (Div. 2)A,B,C,D,E
- Codeforces Round #242 (Div. 2) B. Megacity
- Codeforces Round #249 (Div. 2) B. Pasha Maximizes
- Codeforces Round #247 (Div. 2) B - Shower Line
- Codeforces Round #253 (Div. 2) B - Kolya and Tandem Repeat
- Codeforces Round #252 (Div. 2) B. Valera and FruitsUI
- Codeforces Round #246 (Div. 2) B. Football Kit
- Codeforces Round #244 (Div. 2) B. Prison Transfer
- Codeforces Round #280 (Div. 2 A,B,C,D,E)
- Codeforces Round #228 (Div. 2) B. Fox and CrossROS
- Codeforces Round #215 (Div. 2) B. Sereja and Suffixes
- Codeforces Round #243 (Div. 2) B. Sereja and Mirroring
- Codeforces Round #196 (Div. 2) B. Routine Problem
- Codeforces Round #251 (Div. 2) B. Devu, the Dumb Guydev
- Codeforces Round #209 (Div. 2) B. Permutation
- Codeforces Round #639 (Div. 2)
- Codeforces Round #541 (Div. 2)
- Codeforces Round #682 (Div. 2)
- Codeforces Round #678 (Div. 2)
- Codeforces Round #747 (Div. 2)
- Codeforces Round #673 (Div. 2)
- Codeforces Round #672 (Div. 2)
- Codeforces Round #448 (Div. 2) A
- Codeforces Round #217 (Div. 2)