2 solutions
-
0
#include <bits/stdc++.h> using namespace std; int n, k; string s, a[7] = {"Purple", "Red", "Orange", "Yellow", "Green", "Blue", "Cyan"}; int main() { cin >> n; for (int i = 1;i <= n;i++) { cin >> s >> k; for (int j = 0;j < 7;j++) { if (a[j] == s) { cout << a[(j + k + 1) % 7] << endl; } } } return 0; }
Information
- ID
- 1025
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 39
- Accepted
- 9
- Uploaded By