ZOJ-1494
2013-12-16 11:28
183 查看
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); if (n == 0) break; int u = sc.nextInt(); int d = sc.nextInt(); int minutes = 0; int total = 0; while (true) { total += u; minutes++; if (total >= n) break; total -= d; minutes++; } System.out.println(minutes); } } }
相关文章推荐
- ZOJ 1494 Climbing Worm
- ZOJ 1494 Climbing Worm
- zoj 1494 Climbing Worm
- ZOJ 1494 爬虫爬井
- zoj 1494 Climbing Worm(经典数学水题)
- zoj1494
- HDU 1049/ZOJ 1494 Climbing Worm
- 哈理工oj(acm.hrbust.edu.cn) 1494 ,zoj1311,poj1144【求割点,Targan算法】
- zoj 1494 Climbing Worm
- ZOJ 1494 Climbing Worm 数学水题
- ZOJ 1494 Climbing Worm 数学水题
- zoj1494 暴力模拟 简单数学问题
- ZOJ Problem Set–1494 Climbing Worm
- ZOJ 1494 Climbing Worm
- zoj1494
- zoj 1494 Climbing Worm[水]
- zoj 1453 Surround the Trees
- ZOJ-2476
- POJ 3654 & ZOJ 2936 & HDU 2723 Electronic Document Security(模拟)
- zoj 3955 矩阵+ 思维 training2