|
|
back to boardWhat's wrong with my code (WA 4) int main() { long cor = 0 , k , l; cin >> k; for (long i = 2 ; i <= 10000 ; i ++) { if (k % i == 0) { l = k / i; if ((l > 2)) {cor = 1; break;} } } if (cor == 1) cout << l - 1; else cout << k - 1; return 0; } |
|
|