编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#29222 | #2066. 天梯赛 | Compile Error | 0 | 0 ms | 0 K | Ruby / 487 B | 192023212616 | 2025-03-15 18:07:41 |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,h,sum=0;
cin>>n>>m>>h;
if(n>0&&n<=100&&m>0&&m<=100&&h>0&&h<=90){
if(n>80&&m>40){
sum=n+m+h;
if(sum>=175&&sum<220){
cout<<"3"<<endl;
}
else if(sum>=220&&sum<250) {
cout<<"2"<<endl;
}
else if(sum>=250&&sum<290){
cout<<"1"<<endl;
}
else{
cout<<"-1"<<endl;
}
}
else{
cout<<"-1"<<endl;
}
}
else{
cout<<"-1"<<endl;
}
return 0;
}
编译信息
a.rb:6: syntax error, unexpected '{', expecting `then' or ';' or '\n'
...=100&&m>0&&m<=100&&h>0&&h<=90){
... ^
a.rb:7: syntax error, unexpected '{', expecting `then' or ';' or '\n'
if(n>80&&m>40){
^
a.rb:9: syntax error, unexpected '{', expecting `then' or ';' or '\n'
if(sum>=175&&sum<220){
^
a.rb:12: syntax error, unexpected `else', expecting end-of-input
else if(sum>=220&&sum<250) {
^~~~