#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<string> #include<cmath> using namespace std; int main() { long k; while (cin >> k) { long res = 23 + (k - 1) * 3 * 5 * 7; //满足要求的数都可以整除3 * 5 * 7, 然后再除23看余数就行了 cout << res << endl; } } |
Double click to view unformatted code.