You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
340 B
14 lines
340 B
2 years ago
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
int main() {
|
||
|
for (int i = 1;; i++) {
|
||
|
int a = 429 % i, b = 791 % i, c = 500 % i;
|
||
|
if (a == c + 5 && b == 2 * c) {
|
||
|
cout << i << endl;
|
||
|
cout << "a=" << a << ",b=" << b << ",c=" << c << endl;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|