Submission #656224

# Submission time Handle Problem Language Result Execution time Memory
656224 2022-11-06T15:00:33 Z Hydroxic_Acid Logičari (COCI21_logicari) C++17
0 / 110
0 ms 212 KB
#include <iostream>
using namespace std;

int N;

int main(){
    cin >> N;

    bool can = true;
    int originalN = N;
    while(N > 1){
        if(N % 2){
            can = false;
            break;
        }
        else N /=2;
    }
    if(can) cout << originalN / 2;
    else cout << -1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -