1968. [AHOI2005]约数研究【数论】
生活随笔
收集整理的這篇文章主要介紹了
1968. [AHOI2005]约数研究【数论】
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Description
Input
只有一行一個整數 N(0 < N < 1000000)。Output
只有一行輸出,為整數M,即f(1)到f(N)的累加和。Sample Input
3Sample Output
5
?
http://blog.csdn.net/aarongzk/article/details/50647495
?
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int n,ans; 5 int main() 6 { 7 scanf("%d",&n); 8 for(int i=1; i<=n; i++) 9 ans+=n/i; 10 printf("%d\n",ans); 11 }轉載于:https://www.cnblogs.com/refun/p/8682441.html
總結
以上是生活随笔為你收集整理的1968. [AHOI2005]约数研究【数论】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 面向对象--内部属性类型
- 下一篇: 简历中的项目如何体现实战能力? 如何有技