1322 floppies.cpp
来自「ACM 威士忌部分答案」· C++ 代码 · 共 31 行
CPP
31 行
/*
1322 Floppies
Time Limit : 1000 ms Memory Limit : 32768 K Output Limit : 256 K
GUN C++
*/
#include <iostream>
#include <cmath>
using namespace std;
const double Max=1000000000;
const double One=1860000;
int main()
{
int t,ans;
double s,size;
t=1;
while(cin>>s && s!=0)
{
size=ceil(s/2*1.5);
ans=(int)ceil(size/One);
cout<<"File #"<<t++<<endl;
cout<<"John needs "<<ans<<" floppies."<<endl<<endl;
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?