I - Count
来源:互联网 发布:calendar.js api 编辑:程序博客网 时间:2024/05/01 19:15
I -Count
这个题目也不能说什么了,忽略了一个条件,本来以为爆难,结果。。。发现问题后,就出来了
#include<cstdio>#include<cstring>int ans[1005];void getans(){ ans[1]=1; ans[2]=1; ans[3]=2; ans[4]=3; for(int i=5;i<1001;i++) { for(int j=1;j<i;j++) { if((i-1)%j == 0) { ans[i] += ans[j]; ans[i] %= 1000000007; }; } }}int main(){ int n,ncase=1; memset(ans,0,sizeof(ans)); getans(); while(scanf("%d",&n)!=EOF) { printf("Case %d: %d\n",ncase++,ans[n]); } return 0;}
- I - Count
- I Count Two Three
- 5878 I Count Two Three
- HDU5878-I Count Two Three
- hdoj-5878-I Count Two Three
- hdu5878 I Count Two Three(水题)
- hdu 5878 I Count Two Three
- 【30.53%】【hdu 5878】I Count Two Three
- HDU 5878 I Count Two Three .
- HDU 5878 - I Count Two Three
- HDU 5878 I Count Two Three
- hdoj 5878 I Count Two Three
- HDU-5878-I Count Two Three
- How do I love thee? Let me count the ways
- 11i and R12 Table Count in Different Module
- 2016青岛online——I count two three
- HDU 5878 I Count Two Three (dfs+二分)
- hdu 5878 I Count Two Three(二分)
- Openbravo ERP介绍(三)
- Git详解之三 Git分支2
- ubifs文件系统制作与移植
- JS对象prototype 属性
- Use gitk to understand git
- I - Count
- Xcode4.6发布了
- 基于MCS-51单片机的交通灯设计
- Use gitk to understand git – merge and rebase
- Activity跳转短暂黑屏
- jsp页面防止刷新重复提交解决方案
- Gedit中文乱码的解决
- poj2185 Milking Grid
- Maven是个什么玩意