Task: | Coloring cube |
Sender: | aalto2024f_007 |
Submission time: | 2024-10-02 16:28:46 +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.01 s | details |
#6 | ACCEPTED | 0.01 s | details |
#7 | ACCEPTED | 0.02 s | details |
#8 | ACCEPTED | 0.06 s | details |
#9 | ACCEPTED | 0.06 s | details |
#10 | ACCEPTED | 0.07 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define PRINT_ARR(arr, n) \ do { \ for (int i = 0; i < n; i++) { \ cout << arr[i] << " "; \ } \ cout << "\n"; \ } while (0) typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; const size_t SIZE = 3; char color[SIZE] = {'R', 'G', 'B'}; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { for (int k = 0; k < n; k++) { if (k != 0) cout << " "; cout << color[(k+i+j) % SIZE]; } cout << endl; } cout << endl; } return 0; }
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 G B ... 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 |