Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- #define eps 0.00000001
- using namespace std;
- /*
- ░░░░░░░░░░░░░░░░░░░░░░░▄▄
- ░░░░░░░░░░░░░░░░░░░░░▄▀░░▌
- ░░░░░░░░░░░░░░░░░░░▄▀▐░░░▌
- ░░░░░░░░░░░░░░░░▄▀▀▒▐▒░░░▌
- ░░░░░▄▀▀▄░░░▄▄▀▀▒▒▒▒▌▒▒░░▌
- ░░░░▐▒░░░▀▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒█
- ░░░░▌▒░░░░▒▀▄▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄
- ░░░░▐▒░░░░░▒▒▒▒▒▒▒▒▒▌▒▐▒▒▒▒▒▀▄
- ░░░░▌▀▄░░▒▒▒▒▒▒▒▒▐▒▒▒▌▒▌▒▄▄▒▒▐
- ░░░▌▌▒▒▀▒▒▒▒▒▒▒▒▒▒▐▒▒▒▒▒█▄█▌▒▒▌
- ░▄▀▒▐▒▒▒▒▒▒▒▒▒▒▒▄▀█▌▒▒▒▒▒▀▀▒▒▐░░░▄
- ▀▒▒▒▒▌▒▒▒▒▒▒▒▄▒▐███▌▄▒▒▒▒▒▒▒▄▀▀▀▀
- ▒▒▒▒▒▐▒▒▒▒▒▄▀▒▒▒▀▀▀▒▒▒▒▄█▀░░▒▌▀▀▄▄
- ▒▒▒▒▒▒█▒▄▄▀▒▒▒▒▒▒▒▒▒▒▒░░▐▒▀▄▀▄░░░░▀
- ▒▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▄▒▒▒▒▄▀▒▒▒▌░░▀▄
- ▒▒▒▒▒▒▒▒▀▄▒▒▒▒▒▒▒▒▀▀▀▀▒▒▒▄▀
- ▒▒▒▒▒▒▒▒▒▒▀▄▄▒▒▒▒▒▒▒▒▒▒▒▐
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▀▀▄▄▄▒▒▒▒▒▒▌
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
- */
- int main()
- {
- ios::sync_with_stdio(0);
- cout << fixed << setprecision(10);
- int a,b,c;
- cin >> a >> b >> c;
- double x = 1.0*a/b;
- double del = 0.1;
- //cout << x << endl;
- x = (x/del);
- //cout << "0.";
- //cout << int(floor(x)) << " ";
- for (int i = 1; i < 10;i++) {
- if (int(floor(x))%10 == c) {
- cout << i;
- return 0;
- }
- x = (x/del);
- //cout << int(floor(x));
- }
- cout << -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement