Created
February 6, 2019 20:21
-
-
Save omarnazih/5e81c47b8cd29813833d088cef353178 to your computer and use it in GitHub Desktop.
codeforces-732A---Buy-a-Shovel.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int k,r; | |
int x = 0; | |
cin>> k >> r; | |
do{ | |
if((x+r)%k == 0){ | |
x+=r; | |
break; | |
} | |
x+=10; | |
}while(x % k != 0); | |
cout << x / k; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment