Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119833 | wjx10 | 过生日 | C++ | Compile Error | 0 MS | 0 KB | 400 | 2025-05-19 20:50:10 |
#include<bits/stdc++.h> using namespace std; int main() { int T; cin>>T; int a,b,sum; for(int i=1;i<=T;i++) { cin>>a>>b; if (a%4==0&&a%100!==0) { sum=4*(b-1); } else if(a%4==0) { sum=4*b; } else { a++; } cout<<sum; } return 0; }
Main.cc: In function 'int main()': Main.cc:11:28: error: expected primary-expression before '=' token if (a%4==0&&a%100!==0) ^