UVa1583 - Digit Generator 生成元 (java版本)
来源:互联网 发布:软件使用 编辑:程序博客网 时间:2024/05/21 19:36
1583 - Digit Generator
Time limit: 3.000 seconds
原始地址:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=829&page=show_problem&problem=4458
import java.util.Scanner;public class Digit_Generator {public static void main(String[] args) {Scanner in = new Scanner(System.in);String s="";while(in.hasNext()){int y=in.nextInt();int i;if (y==0) break;else{for( i=1;i<y;i++){int k=i;int j=0;do{j+=k%10;k/=10;}while(k!=0);if (j+i==y){s+=i+"\n";break;}}if(i==y){s+="0\n";}}}System.out.println(s);}}
0 0
- UVa1583 - Digit Generator 生成元 (java版本)
- 生成元(Digit Generator,ACM/ICPC Seoul 2005, UVa1583)
- 生成元(Digit Generator, ACM/ICPC Seoul 2005, UVa1583)
- 生成元(Digit Generator, ACM/ICPC Seoul 2005, UVa1583)
- UVA1583 - Digit Generator(生成元,打表)
- 最小生成元 (Digit Generator, ACM/ICPC Seoul 2005, UVa1583)
- 《算法竞赛入门经典2ndEdition 》例题3-5 生成元(Digit Generator, Uva1583)
- UVa1583 - Digit Generator
- UVA1583 - Digit Generator
- uva1583 - Digit Generator
- uva1583-digit generator
- UVA1583 UVALive3355 Digit Generator
- UVA1583 - Digit Generator
- UVa1583-Digit Generator
- Digit Generator—UVa1583
- Digit Generator 生成元(P52) / UVA
- UVa1583——Digit Generator
- UVa1583 Digit Generator另一种解法
- 腾讯Tencent
- 魔都一月记
- ios属性和实例变量
- codeforces 165C Another Problem on Strings 双指针
- [leetcode]Maximum Subarray
- UVa1583 - Digit Generator 生成元 (java版本)
- Java中Object类的equals方法
- IP问题(1)
- BGRABitmap图像操作6:前面的长方形改成既有圆角又有尖角
- ORACLE索引的作用及用法
- Linux 下编译C语言
- Atlantis(离散化)
- 从决策树学习谈到贝叶斯分类算法、EM、HMM
- C++ 对象的内存布局(上)