竞赛
考级
法兰西玫瑰
#include <iostream> using namespace std; int main(){ //输入数据 int n,m,x; cin>>n>>m>>x; /*分析: 迟到的情况(即无论用什么方法,也到不了学校) 1.做客梯到不了2.做货梯到不了3.走楼梯也到不了 接着,把以上的伪代码用程序语言写出来 即:1.n+5+15>x 2.m+10+15>x 3.(18-1)*1+15>x 简化为:n+20>x&&m+25>x&&32>x 所以可以得到代码为:if(n+20>x&&m+25>x&&32>x) printf("late\n"); }
Voldemort
空降坐标:CP003062 相似题:上学问题 请看代码
Lee Wen
逍遥骇好=&
#include <iostream> using namespace std; int n,m,x; int main(){ cin >> n >> m >> x; if(17+15 <= x || n+5+15 <= x || m+10+15 <= x){ cout << "on time"; }else{ cout << "late"; } return 0; }
Rick
一时想起,四季等你
zyz610
有事找大号
#include <iostream> using namespace std; int main(){ int n,m,x; cin>>n>>m>>x; if(17+15>x&&n+5+15>x&&m+10+15>x){ cout<<"late"; } else{ cout<<"on time"; } return 0; }
复仇者-天之神皮皮虾(回关)
zsy
提交答案之后,这里将显示提交结果~