CSES - HIIT Open 2018 - Results
Submission details
Task:Alien Invasion
Sender:Lucinda
Submission time:2018-05-26 11:27:00
Language:C++
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#20.01 sdetails
#30.01 sdetails
#40.01 sdetails
#50.01 sdetails
#6ACCEPTED0.01 sdetails
#70.01 sdetails
#8ACCEPTED0.01 sdetails
#90.01 sdetails
#10ACCEPTED0.01 sdetails
#110.01 sdetails
#120.01 sdetails
#130.01 sdetails
#14ACCEPTED0.01 sdetails
#15ACCEPTED0.01 sdetails
#16ACCEPTED0.02 sdetails
#170.01 sdetails
#180.01 sdetails
#190.01 sdetails
#20ACCEPTED0.01 sdetails
#210.01 sdetails
#22ACCEPTED0.01 sdetails

Code

#include <iostream>
#include <string>
#include <stdio.h>
#include <math.h>

using namespace std;

int main() {
    int n;
    cin >> n;
    int u = floor(sqrt(n));
    int count = 0;
    for (int i = 1; i <= u; i++) {
        if (n % i == 0) count++;
    }
    if (count % 2 == 0) cout << "even" << endl;
    else cout << "odd" << endl;
}

Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
odd

user output
odd

Test 2

Verdict:

input
2

correct output
even

user output
odd

Test 3

Verdict:

input
3

correct output
even

user output
odd

Test 4

Verdict:

input
4

correct output
odd

user output
even

Test 5

Verdict:

input
5

correct output
even

user output
odd

Test 6

Verdict: ACCEPTED

input
6

correct output
even

user output
even

Test 7

Verdict:

input
7

correct output
even

user output
odd

Test 8

Verdict: ACCEPTED

input
8

correct output
even

user output
even

Test 9

Verdict:

input
9

correct output
odd

user output
even

Test 10

Verdict: ACCEPTED

input
10

correct output
even

user output
even

Test 11

Verdict:

input
11

correct output
even

user output
odd

Test 12

Verdict:

input
12

correct output
even

user output
odd

Test 13

Verdict:

input
13

correct output
even

user output
odd

Test 14

Verdict: ACCEPTED

input
14

correct output
even

user output
even

Test 15

Verdict: ACCEPTED

input
15

correct output
even

user output
even

Test 16

Verdict: ACCEPTED

input
16

correct output
odd

user output
odd

Test 17

Verdict:

input
17

correct output
even

user output
odd

Test 18

Verdict:

input
18

correct output
even

user output
odd

Test 19

Verdict:

input
19

correct output
even

user output
odd

Test 20

Verdict: ACCEPTED

input
999999874000003969

correct output
odd

user output
odd

Test 21

Verdict:

input
999999999999999989

correct output
even

user output
odd

Test 22

Verdict: ACCEPTED

input
1000000000000000000

correct output
odd

user output
odd