Created
November 26, 2018 07:11
-
-
Save nukopy/e43035481fe1827773a34d8c9f990c46 to your computer and use it in GitHub Desktop.
ABC060 B - Choice Intergers
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 A, B, C; | |
cin >> A >> B >> C; | |
for (int i = 1; i <= B; ++i) { | |
if (A*i%B == C) { | |
cout << "YES" << "\n"; | |
return 0; | |
} | |
} | |
cout << "NO" << "\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment