codevs1007
2016-04-04 17:13
405 查看
#include<iostream>
#include<altorithm>
using namespace std;
int main()
{
int n=0,k;
double s=0;
cin>>k;
while (s<=k)
{
n++;
s+=(double)1/n;
}
cout<<n;
return 0;
}
#include<altorithm>
using namespace std;
int main()
{
int n=0,k;
double s=0;
cin>>k;
while (s<=k)
{
n++;
s+=(double)1/n;
}
cout<<n;
return 0;
}
相关文章推荐
- ExtMail Solution HOWTO for Linux
- Exchange 2010 - BareLinefeedsAreIllegal error when journaling to external box
- 后缀的意思
- Let's Try and Break the Vicious Circle with Sport
- On Window 7 to install DB2 error summarize
- WRF compile errors
- Codevs 1201 题解
- Codevs 1076 题解
- Solution to CLRS Chapter 2
- Solution to CLRS Chapter 3
- Solution to CLRS Chapter 4
- Solution to CLRS Chapter 5
- 2996 Comrade 同志
- 3783
- 2833 奇怪的梦境
- 1076 排序
- Codevs 1021 玛丽卡
- CRM Extensibilities -01- Solution
- [codevs 1187]Xor最大路径 Trie+贪心
- codevs1225 八数码难题(A*搜索+康托展开)