Task: | Alien Invasion |
Sender: | Lucinda |
Submission time: | 2018-05-26 11:27:00 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | WRONG ANSWER | 0.01 s | details |
#3 | WRONG ANSWER | 0.01 s | details |
#4 | WRONG ANSWER | 0.01 s | details |
#5 | WRONG ANSWER | 0.01 s | details |
#6 | ACCEPTED | 0.01 s | details |
#7 | WRONG ANSWER | 0.01 s | details |
#8 | ACCEPTED | 0.01 s | details |
#9 | WRONG ANSWER | 0.01 s | details |
#10 | ACCEPTED | 0.01 s | details |
#11 | WRONG ANSWER | 0.01 s | details |
#12 | WRONG ANSWER | 0.01 s | details |
#13 | WRONG ANSWER | 0.01 s | details |
#14 | ACCEPTED | 0.01 s | details |
#15 | ACCEPTED | 0.01 s | details |
#16 | ACCEPTED | 0.02 s | details |
#17 | WRONG ANSWER | 0.01 s | details |
#18 | WRONG ANSWER | 0.01 s | details |
#19 | WRONG ANSWER | 0.01 s | details |
#20 | ACCEPTED | 0.01 s | details |
#21 | WRONG ANSWER | 0.01 s | details |
#22 | ACCEPTED | 0.01 s | details |
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: WRONG ANSWER
input |
---|
2 |
correct output |
---|
even |
user output |
---|
odd |
Test 3
Verdict: WRONG ANSWER
input |
---|
3 |
correct output |
---|
even |
user output |
---|
odd |
Test 4
Verdict: WRONG ANSWER
input |
---|
4 |
correct output |
---|
odd |
user output |
---|
even |
Test 5
Verdict: WRONG ANSWER
input |
---|
5 |
correct output |
---|
even |
user output |
---|
odd |
Test 6
Verdict: ACCEPTED
input |
---|
6 |
correct output |
---|
even |
user output |
---|
even |
Test 7
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
even |
user output |
---|
odd |
Test 8
Verdict: ACCEPTED
input |
---|
8 |
correct output |
---|
even |
user output |
---|
even |
Test 9
Verdict: WRONG ANSWER
input |
---|
9 |
correct output |
---|
odd |
user output |
---|
even |
Test 10
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
even |
user output |
---|
even |
Test 11
Verdict: WRONG ANSWER
input |
---|
11 |
correct output |
---|
even |
user output |
---|
odd |
Test 12
Verdict: WRONG ANSWER
input |
---|
12 |
correct output |
---|
even |
user output |
---|
odd |
Test 13
Verdict: WRONG ANSWER
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: WRONG ANSWER
input |
---|
17 |
correct output |
---|
even |
user output |
---|
odd |
Test 18
Verdict: WRONG ANSWER
input |
---|
18 |
correct output |
---|
even |
user output |
---|
odd |
Test 19
Verdict: WRONG ANSWER
input |
---|
19 |
correct output |
---|
even |
user output |
---|
odd |
Test 20
Verdict: ACCEPTED
input |
---|
999999874000003969 |
correct output |
---|
odd |
user output |
---|
odd |
Test 21
Verdict: WRONG ANSWER
input |
---|
999999999999999989 |
correct output |
---|
even |
user output |
---|
odd |
Test 22
Verdict: ACCEPTED
input |
---|
1000000000000000000 |
correct output |
---|
odd |
user output |
---|
odd |