Submission #338375

# Submission time Handle Problem Language Result Execution time Memory
338375 2020-12-23T04:47:52 Z boykut Chessboard (IZhO18_chessboard) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>

using namespace std;

signed main() {
   ios::sync_with_stdio(0);
   cin.tie(0);
   int n, k;
   cin >> n >> k;
   if (k == 0) {
      int ans = -1;
      for (int i = 2; i <= n; i++) {
         if (n % i == 0) {
            int m = n / i;
            
            int res = ((n*n) / (m*m)) / 2 * (m *m);
            
            if (ans == -1 || ans < res)
               ans = res;
         }
      }
      cout << ans << '\n';
   }
   return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -