fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. int T;
  6. int H;
  7. int W;
  8. int N;
  9. Scanner sc = new Scanner(System.in);
  10. T = sc.nextInt();
  11. for (int i = 0; i < T; i++) {
  12. H = sc.nextInt();
  13. W = sc.nextInt();
  14. N = sc.nextInt();
  15. if(N / H < 10){
  16. if(N % H == 0){//나머지가 0일때 , (층수*100)+호수(호수는 몫)
  17. System.out.println((H*100)+(N/H));
  18. }else {//나머지가 0이 아닐때 , 나머지가 층수 몫+1이 호수
  19. System.out.println(((H%N)*100)+((N/H)+1));
  20. }
  21. }
  22. }
  23. }
  24. }
Success #stdin #stdout 0.12s 54636KB
stdin
2
6 12 10
30 50 72
stdout
602
3003