Task: | Coloring cube |
Sender: | aalto2024f_001 |
Submission time: | 2024-10-02 16:39:17 +0300 |
Language: | C++ (C++20) |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 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.01 s | details |
#8 | ACCEPTED | 0.04 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | ACCEPTED | 0.05 s | details |
Code
#include <cstdio> #include <iostream> #include <utility> #include <vector> using namespace std; int main(int argc, char *argv[]) { // Read the input parameters int n; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { for (int k = 0; k < n; k++) { int letter_code = (i + j + k) % 3; if (letter_code == 0) cout << "R "; if (letter_code == 1) cout << "G "; if (letter_code == 2) cout << "B "; } cout << "\n"; } cout << "\n"; } 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 ... 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 |