Classroom Watch (Codeforces Round #441 (Div.2) )
来源:互联网 发布:中学生学编程学什么好 编辑:程序博客网 时间:2024/05/17 01:26
#include <cstdio>#include <algorithm>using namespace std;int n;int ans[300];int main(){ while(~scanf("%d",&n)) { int now = max(n-90,0); int a,b,k=0; for(int i=now;i<=n;i++) { a=b=i; while(b) { a+=b%10; b/=10; } if(a==n) ans[k++]=i; } printf("%d\n",k); for(int i=0;i<k;i++) printf("%d\n",ans[i]); } return 0;}
阅读全文
0 0
- Classroom Watch (Codeforces Round #441 (Div.2) )
- Codeforces Round #441 (Div. 2)C. Classroom Watch(枚举+脑子)
- Codeforces Round #441 (Div. 2, by Moscow Team Olympiad) C. Classroom Watch
- Codeforces Round #441 div2 C. Classroom Watch
- Codeforces Round #441 C. Classroom Watch
- Codeforces 876C Classroom Watch
- Codeforces 876 C Classroom Watch
- CodeForces 876C Classroom Watch
- codeforces 876C Classroom Watch
- Codeforces 875A Classroom Watch
- CodeForces 875A Classroom Watch
- CodeForces-876C Classroom Watch
- Codeforces Round #359 (Div. 2) C. Robbers' watch
- Codeforces Round #359 (Div. 2) C. Robbers' watch (DFS)
- Codeforces Round #359 (Div. 2)C. Robbers' watch
- Codeforces Round #359 (Div. 2) C. Robbers' watch
- Codeforces Round #359 (Div. 2) C. Robbers' watch dfs
- C. Classroom Watch(思路)---codeforces
- 【精】客户端(iOS、Android)/Server,APP内部的通信协议,跨平台方案
- Mybatis系列---强大的动态SQL
- 导航栏二级悬浮菜单样式
- 数据库范式
- AmazonS3文档——对象存储的用法之《存储桶操作》
- Classroom Watch (Codeforces Round #441 (Div.2) )
- 可编辑div中如何在光标位置添加内容
- 模板整理: 图论---最短路
- 浅谈Log4j和Log4j2的区别
- ios 11和iphone x的相关适配
- 【bzoj4241】历史研究
- Spark源码分析之Master状态改变处理机制原理
- 内存对齐
- Android-安全-签名验证让二次打包变的更难