Codeforces Round #204 (Div. 2) A Jeff and Digits
来源:互联网 发布:桌面日历 知乎 编辑:程序博客网 时间:2024/06/09 23:16
= = 能被90整除的数。。。
要最后一位是零,前面的位数要 和能被9整除。
#include<iostream>#include<algorithm>#include<cstring>#include<cstdio>using namespace std;int main(){ int n; int s1=0,s2=0; scanf("%d",&n); while(n--) { int ab; scanf("%d",&ab); if(ab==0)s1++; else s2++; } int tmp=s2/9; if(s1!=0) for(int i=1;i<=tmp;i++) { printf("555555555"); } else {printf("-1\n");return 0;} if(tmp==0)printf("0"); else { while(s1--) { printf("0"); } } puts(""); return 0;}
- Codeforces Round #204 (Div. 2) A. Jeff and Digits
- Codeforces Round #204 (Div. 2) A Jeff and Digits
- Codeforces Round #204 (Div. 1) A. Jeff and Rounding
- Codeforces Round #204 (Div. 2) B. Jeff and Periods
- Codeforces Round #204 (Div. 2) C. Jeff and Rounding
- Codeforces Round #204 (Div. 2) C Jeff and Rounding
- Codeforces Round #204 (Div. 2) B - Jeff and Periods
- CodeForces 352A Jeff and Digits
- CodeForces-352A Jeff and Digits
- Codeforces Round #204 (Div. 1) E. Jeff and Permutation
- A. Jeff and Digits
- CF#204DIV2:A. Jeff and Digits
- Codeforces Round #204 (Div. 1) C Jeff and Brackets dp+矩阵加速
- Codeforces Round #204 (Div. 1) B. Jeff and Furik 1月7日
- Codeforces Round #277.5 (Div. 2) C. Given Length and Sum of Digits...
- Codeforces Round #277.5 (Div. 2)C——Given Length and Sum of Digits...
- Codeforces Round #277.5 (Div. 2)---C. Given Length and Sum of Digits (贪心)
- Codeforces Round #277.5 (Div. 2) C Given Length and Sum of Digits...
- 在Ubuntu下firefox添加java-plug-in
- Android UI开发第十七篇——Android Fragment实例(ListFragment)
- C++矩阵运算库推荐
- 基于内容的图像检索引擎(以图搜图)
- Ubuntu使用笔记——SSL
- Codeforces Round #204 (Div. 2) A Jeff and Digits
- 爱因斯坦:培养独立思考的教育
- 当group by 和 order by 一起出现时
- 9个offer,12家公司,35场面试,从微软到谷歌
- 【Python】Python读写文件实际操作的五大步骤
- linux用户权限的管理
- 排列组合
- a small step(个人小站)
- JAVA学习路线图---(JAVA1234)