OJ-Problems-Source/HDOJ/1322_autoAC.cpp

19 lines
363 B
C++
Raw Normal View History

2016-08-13 23:51:27 +08:00
#include <stdio.h>
int main()
{
double in;
int out,count = 1;
while(scanf("%lf",&in)!=EOF,in!=0)
{
in *= 0.75;
in /= (1.86*1000000);
out = (int)in;
if(in - out != 0)
{
out++;
}
printf("File #%d\nJohn needs %d floppies.\n\n",count++,out);
}
return 0;
}