乐透号码
2015-08-19 20:15
477 查看
import java.util.Scanner; public class LottoNumbers { public static void main(String [] args) { Scanner input=new Scanner(System.in); boolean [] isCovered=new boolean[99]; int number=input.nextInt(); while(number!=0) { isCovered[number-1]=true; number=input.nextInt(); } boolean allCovered=true; for(int i=0;i<100;i++) if(!isCovered[i]) { allCovered=false; break; } if(allCovered) { System.out.println("The ticket cover all numbers"); }else System.out.println("The ticket don't cover all numbers"); } }
相关文章推荐
- HDU 3336 Count the string(KMP+Next数组递推)
- HDU - 4090(暴力剪纸题目,)
- IOS-笔记9(多MVC,View间转换)
- flowplayer(5.5.2版本)的播放视频
- 逆序数的几种求法
- 杭电(hdu)2544 最短路
- MLC模式这边看过来
- ios文件管理
- 软件工程—总结
- 123
- vijos - P1739计算系数 (多项式计算 + 杨辉三角形 + 快速幂)
- leetcode 257: Binary Tree Paths
- java IO流总结
- Intent的启动和属性(action)
- codeforces 123A A. Prime Permutation(数论+构造)
- iOS -归档
- ios 控制器的生命周期
- VC++新建工程和调试
- 黑马程序员—反射
- 五大布局——表格、帧、绝对布局