Wrong Answer
Code
#include<stdio.h>
int main(){
int n, i; scanf("%d", &n);
int a[n];
for(i=0;i<n;i++){
scanf("%d", &a[i]);
}
for(i=0;i<n;i++){
if(a[i]%6==0){
printf("RGB\n");
}
else if(a[i]%5==0){
printf("RBG\n");
}
else if(a[i]%4==0){
printf("BRG\n");
}
else if(a[i]%3==0){
printf("BGR\n");
}
else if(a[i]%2==0){
printf("GBR\n");
}
else{
printf("GRB\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1010 Red Green Blue
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 14:53:45
- Judged At
- 2024-11-11 03:46:07
- Judged By
- Score
- 20
- Total Time
- 1ms
- Peak Memory
- 324.0 KiB