Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41632 | wuxinyue | 余数相同问题 | C++ | Accepted | 0 MS | 252 KB | 250 | 2024-02-22 20:14:04 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin >> a; cin >> b; cin >> c; int x = 2; while(x <= a + b + c){ if(a % x == b % x and b % x == c % x ){ cout << x; return 0; } x++; } return 0; }