Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
108393 | 胥博雯 | 07苹果和虫子 | C++ | Compile Error | 0 MS | 0 KB | 253 | 2025-01-20 10:46:09 |
#include<iostream> using namespace std; int main(){ int n,x,y,z; cin>>n>>x>>y; z=n-y/x if(y%x!=0){ z-=1; } if(z<=0){ cout<<0<<endl; } else{ cout<<z<<endl; } return 0; }
Main.cc: In function 'int main()': Main.cc:7:5: error: expected ';' before 'if' if(y%x!=0){ ^