C语言编程题When you are goneWhen you are gone时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:584 测试通过:63描述When you walk away I count the steps that you take Do you see how much I nee
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 21:23:09
C语言编程题When you are goneWhen you are gone时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:584 测试通过:63描述When you walk away I count the steps that you take Do you see how much I nee
C语言编程题When you are gone
When you are gone
时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte
总提交:584 测试通过:63
描述
When you walk away
I count the steps that you take
Do you see how much I need you right now?
——Avril《When you are gone》
有三位恋人(Alpha,Bob,Cindy),他们都在遥远的相望.(这………………)
他们都在说
离开你我度日如年,
我希望你坐飞机早些回来.
给出你我之间的路程,
和飞机每天能飞的路程.
快告诉我,你几天后能回来.
我要整数,不会有人说我在1.618346天后能看到你吧?!1.1天也是,只要大于1天,那么都算成两天!
输入
输入有且只有一组,这一组包含六个数,分成3行, 每组包括a,b两个数字(a!=0 && b!=0).
输出
输入完三行后,输出三行信息,表示他们y天能够回来,注意单复数.
xx will be back in y day(s).
样例输入
4000 900
1800 900
2000 999
样例输出
Alpha will be back in 5 days.
Bob will be back in 2 days.
Cindy will be back in 3 days.
我的代码如下:
#include
void Alpha(double a,double b)
{
double i;
if(a
C语言编程题When you are goneWhen you are gone时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:584 测试通过:63描述When you walk away I count the steps that you take Do you see how much I nee
用整数运算,求模判断是否能整除,不能整除商加一就可以.不要用double有精度损失.