0
已解决
李宜和
高级启示者
高级启示者
题目链接: 酷町堂:7084
错误代码
#include<iostream>
#include<iomanip>
#include<cmath>
#include<cstdio>
#include<algorithm>
using namespace std;
bool pf(int n){
return abs(sqrt(n)-(int)sqrt(n))<0.0000001;
}
string a[10000],b[8]{"","Red","Orange","Yellow","Green","Blue","Cyan","Purple"};
long long x[10000],n;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
cin>>x[i];
for(int j=0;j<=7;j++){
if(a[i]==b[j]){
if((x[i]+2)>7){
if(b[(x[i]+2)%7]==0){
cout<<"rad";
}else{
cout<<b[(x[i]+2)%7]<<endl;
}
}else{
cout<<b[x[i]+2]<<endl;
}
}
}
}
return 0;
}
问题:
问题:
啊啊啊啊啊周期没学好只能干瞪眼