Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
144019 徐景一 过生日 C++ Compile Error 0 MS 0 KB 532 2026-01-18 15:32:10

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int ,T; int Y[1000],n[1000],i; cin>>T; for(i=0;i<T;i++){ cin>>Y[i]>>n[i]; } for(i=0;i<T;i++){ if(Y[i]%4==0){ Y[i]+4*(n-1); }else if((Y[i]+1)%4==0){ Y[i]+1+4*(n-1); }else if((Y[i]+2)%4==0){ Y[i]+2+4*(n-1); }else if((Y[i]+3)%4==0){ Y[i]+3+4*(n-1); } } for(i=0;i<T;i++){ cout<<Y[i]<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:9: error: expected unqualified-id before ',' token
     int ,T;
         ^
Main.cc:12:24: error: invalid operands of types 'int' and 'int*' to binary 'operator*'
             Y[i]+4*(n-1);
                        ^
Main.cc:14:26: error: invalid operands of types 'int' and 'int*' to binary 'operator*'
             Y[i]+1+4*(n-1);
                          ^
Main.cc:16:26: error: invalid operands of types 'int' and 'int*' to binary 'operator*'
             Y[i]+2+4*(n-1);
                          ^
Main.cc:18:26: error: invalid operands of types 'int' and 'int*' to binary 'operator*'
             Y[i]+3+4*(n-1);
                          ^