题目1038:Sum of Factorials
来源:互联网 发布:做平面图用什么软件 编辑:程序博客网 时间:2024/06/05 21:44
#include <stdio.h>int main(){ int i,n; int number[11]; number[0] = 1; for(i = 1;i < 11;i ++){ number[i] = i * number[i -1]; } while(scanf("%d",&n) != EOF){ if(n == 0){ printf("NO\n"); continue; } for(i = 10;i >= 0;i --){ if(n >= number[i]){ n -= number[i]; } } if(n == 0) printf("YES\n"); else printf("NO\n"); } return 0;}
0 0
- 题目1038:Sum of Factorials
- 题目1038:Sum of Factorials
- 题目1038:Sum of Factorials
- 题目1038:Sum of Factorials
- 题目1038:Sum of Factorials
- 题目1038:Sum of Factorials 九度
- 贪心法_题目1038:Sum of Factorials
- 九度oj 题目1038:Sum of Factorials
- 九度OJ题目1038:Sum of Factorials
- 九度 oj 题目1038:Sum of Factorials
- 九度OJ 1038 Sum of Factorials
- 九度oj-1038-Sum of Factorials
- 九度[1038]-Sum of Factorials
- Sum of Factorials
- Sum of Factorials
- Sum of Factorials
- Sum of Factorials zoj
- poj1775 - Sum of Factorials
- Cascade Classifier Training
- java web开发学习-18 JTA事物处理简介
- MD5和MD5破解的一些事
- java web开发学习-19 JNDI接口简介
- PHP再学习2——RT Thread + LwIP提交表单
- 题目1038:Sum of Factorials
- 菜单MENU学习日记
- java generic 介绍
- c++类内存布局的一些理解(1)
- hust 1017 dancing links
- 第十七周项目2-用指针玩字符串(统计单词个数)
- 17周项目五(6)。谁是小偷
- jQuery中的CSS操作
- sequence使用