Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <bits/stdc++.h>
  3. #define eps 0.00000001
  4. using namespace std;
  5. /*
  6. ░░░░░░░░░░░░░░░░░░░░░░░▄▄
  7. ░░░░░░░░░░░░░░░░░░░░░▄▀░░▌
  8. ░░░░░░░░░░░░░░░░░░░▄▀▐░░░▌
  9. ░░░░░░░░░░░░░░░░▄▀▀▒▐▒░░░▌
  10. ░░░░░▄▀▀▄░░░▄▄▀▀▒▒▒▒▌▒▒░░▌
  11. ░░░░▐▒░░░▀▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒█
  12. ░░░░▌▒░░░░▒▀▄▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄
  13. ░░░░▐▒░░░░░▒▒▒▒▒▒▒▒▒▌▒▐▒▒▒▒▒▀▄
  14. ░░░░▌▀▄░░▒▒▒▒▒▒▒▒▐▒▒▒▌▒▌▒▄▄▒▒▐
  15. ░░░▌▌▒▒▀▒▒▒▒▒▒▒▒▒▒▐▒▒▒▒▒█▄█▌▒▒▌
  16. ░▄▀▒▐▒▒▒▒▒▒▒▒▒▒▒▄▀█▌▒▒▒▒▒▀▀▒▒▐░░░▄
  17. ▀▒▒▒▒▌▒▒▒▒▒▒▒▄▒▐███▌▄▒▒▒▒▒▒▒▄▀▀▀▀
  18. ▒▒▒▒▒▐▒▒▒▒▒▄▀▒▒▒▀▀▀▒▒▒▒▄█▀░░▒▌▀▀▄▄
  19. ▒▒▒▒▒▒█▒▄▄▀▒▒▒▒▒▒▒▒▒▒▒░░▐▒▀▄▀▄░░░░▀
  20. ▒▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▄▒▒▒▒▄▀▒▒▒▌░░▀▄
  21. ▒▒▒▒▒▒▒▒▀▄▒▒▒▒▒▒▒▒▀▀▀▀▒▒▒▄▀
  22. ▒▒▒▒▒▒▒▒▒▒▀▄▄▒▒▒▒▒▒▒▒▒▒▒▐
  23. ▒▒▒▒▒▒▒▒▒▒▒▒▒▀▀▄▄▄▒▒▒▒▒▒▌
  24. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
  25. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
  26. */
  27. int main()
  28. {
  29. ios::sync_with_stdio(0);
  30. cout << fixed << setprecision(10);
  31. int a,b,c;
  32. cin >> a >> b >> c;
  33. double x = 1.0*a/b;
  34. double del = 0.1;
  35. //cout << x << endl;
  36. x = (x/del);
  37. //cout << "0.";
  38. //cout << int(floor(x)) << " ";
  39. for (int i = 1; i < 10;i++) {
  40. if (int(floor(x))%10 == c) {
  41. cout << i;
  42. return 0;
  43. }
  44. x = (x/del);
  45. //cout << int(floor(x));
  46. }
  47. cout << -1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement