Submission #378539

# Submission time Handle Problem Language Result Execution time Memory
378539 2021-03-17T01:36:29 Z LittleCube Chessboard (IZhO18_chessboard) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>
using namespace std;

/*************************************
 * 
 *  Subtask 1 : 8 points
 * 
 */

signed main()
{
    int n, m, k;
    vector<int> v;
    cin >> n >> k;
    m = n;
    for (int i : {3, 5, 7})
        while (m % i == 0)
                v.emplace_back(i), m /= i;
    if (m > 1)
        v.emplace_back(m);

    if (n == (n & -n))
        cout << n * n / 2 << '\n';
    else
        cout << (n * n - (n / v[0]) * (n / v[0])) / 2;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Incorrect 1 ms 364 KB Output isn't correct
# 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 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 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Incorrect 1 ms 364 KB Output isn't correct