HDOJ 1562 Guess the number
来源:互联网 发布:linux中80端口被占用 编辑:程序博客网 时间:2024/05/16 07:06
HDACM 1562
水题…
import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n-->0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int i = (1000/a+1)*a; for (; i < 10000; i+=a) { if ((i+1)%b==0 && (i+2)%c==0) { System.out.println(i); break; } } if (i>=10000) { System.out.println("Impossible"); } } sc.close(); }}
阅读全文
0 0
- hdoj-1562-Guess the number
- HDOJ 1562 Guess the number
- hdoj.1562 Guess the number 20140825
- 1562 Guess the number
- HDOJ(HDU) 1562 Guess the number(水题,枚举就行)
- hdu 1562 Guess the number
- hdu 1562 Guess the number
- HDU 1562 Guess the number
- HDU 1562 Guess the number
- HDU 1562 Guess the number
- hdu-oj 1562 Guess the number
- Guess the Number
- HDOJ1562 Guess the number
- EOJ 1095 Guess the Number
- hdu.1562.Guess the number
- 作业week2 'Guess the number'
- HDU 5981 Guess the number
- HDOJ Guess the number 3337【神题-抓取杭电后台输出数据】
- 一组数字去重
- Jquery组件封装之鼠标移入移出图片透明度变化
- 使php的编码与java的编码保持一致
- 天池—广东政务数据创新大赛—智能算法赛总结
- android中Camera setDisplayOrientation使用
- HDOJ 1562 Guess the number
- JsonCpp的简单使用方法
- 事务回滚后,自增ID仍然增加
- 三分钟读懂TT猫分布式、微服务和集群之路
- Mapper(XML)文件不识别大于号 小于号
- 逆向学习笔记(一)
- tomcat:性能调优
- 算法-把n个数的每一种排列情况都列出来(排列组合)-全排列-字典序算法(一看就懂)
- 由"java.lang.OutOfMemoryError: unable to create new native thread"说起