标签:好的 nbsp targe stream using arp ret sha under
当然有精度的要求啦!~O(∩_∩)O~我两次没定义好double交上去都TLE~~~( ̄▽ ̄*)~~~
看代码吧↖(^ω^)↗O(∩_∩)O哈哈哈~:
#include<iostream> #include<cstdio> using namespace std; int main() { double n=0.0; int k,i; scanf("%d",&k); for(i=1;;i++) { n+=1.0/i; if(n>k) { cout<<i<<endl; break; } } return 0; }
还有一种非常好的数学方法,等我先学,学会再发吧~\(≧▽≦)/~啦啦啦
标签:好的 nbsp targe stream using arp ret sha under
原文地址:https://www.cnblogs.com/xrj1229/p/9230744.html