标签:
--------------------------------------------
需要注意的可能就是余数。
AC代码:
1 import java.util.Scanner; 2 3 public class Main { 4 5 public static void main(String[] args) { 6 7 Scanner sc=new Scanner(System.in); 8 9 int tiems=sc.nextInt(); 10 while(tiems-->0){ 11 int t1=sc.nextInt(); 12 int t2=sc.nextInt(); 13 int ans=t1/t2+(t1/t2*t2==t1?0:1); 14 System.out.println(ans); 15 } 16 17 } 18 19 }
题目来源: http://acm.nyist.net/JudgeOnline/problem.php?pid=1082
标签:
原文地址:http://www.cnblogs.com/cc11001100/p/5875811.html