首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
波耶菠萝蜜
2025年7月27日 20:27
疯狂的小面包 题解:
P1128
回复 0
|
赞 0
|
浏览 11
非常简单的if——else,注意一下用double就行 #include <stdio.h> int main(){ double dist,v,w,t;//新老区距离 车的速度 步行 排队时间 while (scanf("%lf %lf %lf %lf",&dist,&v,&w,&t)==4) { d...
阿灿
2025年3月15日 17:17
疯狂的小面包 题解:
P1128
回复 0
|
赞 3
|
浏览 584
#include<bits/stdc++.h> using namespace std; int main(){ float D,X,Y,T; while(cin>>D>>X>>Y>>T){ ((D/X+T)<D/Y)?cout<<"YES"<<endl:cout<<"NO"<<endl; } return 0; }
RingoCrystal
2025年2月11日 17:02
疯狂的小面包 题解:优先步行
P1128
回复 0
|
赞 4
|
浏览 631
#include <bits/stdc++.h> using namespace std; int main() { double d,x,y,t; while(cin>>d>>x>>y>>t){ double t1=d/x; double t2=d/y; if(t1+t<=t2)cout<<"YES"<<endl; else cout<<"NO"<<endl; ...
未央
2021年6月5日 17:46
1128
P1128
回复 0
|
赞 14
|
浏览 7.7k
#include<stdio.h> int main() { float D, X, Y, T; while(scanf("%f%f%f%f", &D, &X, &Y, &T) != EOF) { float time1, time2; time1 = D/X+T; &...
大白
2020年6月19日 10:19
Accepted答案-疯狂小面包(c)
P1128
回复 0
|
赞 4
|
浏览 9.1k
答案已通过,Accepted 这道题算法很简单,容易出错的是要求“输入多组数据”,所以需要用到while结构。 代码如下: #include<stdio.h> int main(){ int D,X,Y,T; float t1,t2; while(scanf("%d%d%d%d",&D,&X,&Y,&T)!=EOF){ if(0&l...
题目
疯狂的小面包
题解数量
5
发布题解
在线答疑
热门题解
1
1128
2
Accepted答案-疯狂小面包(c)
3
疯狂的小面包 题解:优先步行
4
疯狂的小面包 题解:
5
疯狂的小面包 题解: