Task: | Coloring cube |
Sender: | aalto2024f_005 |
Submission time: | 2024-10-02 16:39:07 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
#4 | ACCEPTED | 0.00 s | details |
#5 | ACCEPTED | 0.02 s | details |
#6 | ACCEPTED | 0.02 s | details |
#7 | ACCEPTED | 0.03 s | details |
#8 | ACCEPTED | 0.09 s | details |
#9 | ACCEPTED | 0.10 s | details |
#10 | ACCEPTED | 0.10 s | details |
Code
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <unordered_map> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { for (int x = 0; x < n; x++) { for (int y = 0; y < n; y++) { int val = i + x + y; cout << (val % 3 == 0 ? 'R' : (val % 3 == 1 ? 'G' : 'B')) << ' '; } cout << endl; } cout << endl; } }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
3 |
correct output |
---|
R G B G B R B R G G B R ... |
user output |
---|
R G B G B R B R G G B R ... |
Test 2
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
R G B R G G B R G B B R G B R R G B R G G B R G B ... |
user output |
---|
R G B R G G B R G B B R G B R R G B R G G B R G B ... Truncated |
Test 3
Verdict: ACCEPTED
input |
---|
6 |
correct output |
---|
R G B R G B G B R G B R B R G B R G R G B R G B G B R G B R ... |
user output |
---|
R G B R G B G B R G B R B R G B R G R G B R G B G B R G B R ... Truncated |
Test 4
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G ... |
user output |
---|
R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R G B R ... Truncated |
Test 5
Verdict: ACCEPTED
input |
---|
50 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |
Test 6
Verdict: ACCEPTED
input |
---|
53 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |
Test 7
Verdict: ACCEPTED
input |
---|
63 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |
Test 8
Verdict: ACCEPTED
input |
---|
95 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |
Test 9
Verdict: ACCEPTED
input |
---|
99 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |
Test 10
Verdict: ACCEPTED
input |
---|
100 |
correct output |
---|
R G B R G B R G B R G B R G B ... |
user output |
---|
R G B R G B R G B R G B R G B ... Truncated |