Task: | Card Trick |
Sender: | Jasper Hjorth |
Submission time: | 2017-09-19 18:57:39 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.04 s | details |
#2 | WRONG ANSWER | 0.04 s | details |
#3 | WRONG ANSWER | 0.04 s | details |
#4 | WRONG ANSWER | 0.04 s | details |
#5 | WRONG ANSWER | 0.05 s | details |
#6 | WRONG ANSWER | 0.05 s | details |
#7 | WRONG ANSWER | 0.04 s | details |
#8 | WRONG ANSWER | 0.03 s | details |
#9 | WRONG ANSWER | 0.04 s | details |
#10 | WRONG ANSWER | 0.05 s | details |
#11 | WRONG ANSWER | 0.04 s | details |
#12 | WRONG ANSWER | 0.03 s | details |
#13 | WRONG ANSWER | 0.05 s | details |
Code
#include <iostream> int main() { int n; int x = 0; int y = 0; std::cin >> n; int cards [n]; for (int i = 1;i <= n;i++) { y = y+i; y = y % n; std::cout << y << "\n"; x += 1; cards[y] = i; y +=1; } std::cout << "\ncunt\n"; for (int j = 0; j < n;j++) { std::cout << cards[j] << "\n"; } }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
1 |
correct output |
---|
1 |
user output |
---|
0 cunt 1 |
Test 2
Verdict: WRONG ANSWER
input |
---|
2 |
correct output |
---|
2 1 |
user output |
---|
1 0 cunt 2 ... |
Test 3
Verdict: WRONG ANSWER
input |
---|
3 |
correct output |
---|
3 1 2 |
user output |
---|
1 1 2 cunt ... |
Test 4
Verdict: WRONG ANSWER
input |
---|
4 |
correct output |
---|
2 1 4 3 |
user output |
---|
1 0 0 1 ... |
Test 5
Verdict: WRONG ANSWER
input |
---|
5 |
correct output |
---|
3 1 4 5 2 |
user output |
---|
1 4 3 3 4 ... |
Test 6
Verdict: WRONG ANSWER
input |
---|
6 |
correct output |
---|
4 1 6 3 2 5 |
user output |
---|
1 4 2 1 1 ... |
Test 7
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
5 1 3 4 2 6 7 |
user output |
---|
1 4 1 6 5 ... |
Test 8
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
3 1 7 5 2 6 8 4 |
user output |
---|
1 4 0 5 3 ... |
Test 9
Verdict: WRONG ANSWER
input |
---|
9 |
correct output |
---|
7 1 8 6 2 9 4 5 3 |
user output |
---|
1 4 8 4 1 ... |
Test 10
Verdict: WRONG ANSWER
input |
---|
10 |
correct output |
---|
9 1 8 5 2 4 7 6 3 10 |
user output |
---|
1 4 8 3 9 ... |
Test 11
Verdict: WRONG ANSWER
input |
---|
11 |
correct output |
---|
5 1 6 4 2 10 11 7 3 8 9 |
user output |
---|
1 4 8 2 8 ... |
Test 12
Verdict: WRONG ANSWER
input |
---|
12 |
correct output |
---|
7 1 4 9 2 11 10 8 3 6 5 12 |
user output |
---|
1 4 8 1 7 ... |
Test 13
Verdict: WRONG ANSWER
input |
---|
13 |
correct output |
---|
4 1 13 11 2 10 6 7 3 5 12 9 8 |
user output |
---|
1 4 8 0 6 ... |