SWEA 4299 태혁이의 사랑은 타이밍

1 개요[ | ]

SWEA 4299 태혁이의 사랑은 타이밍
SW Expert 아카데미
# 문제 풀이

틀:SWEA 난이도 3-3

2 C++[ | ]

3 Java[ | ]

import java.util.*;
public class Solution {
    public static void main(String[] args) {
   	Scanner sc = new Scanner(System.in);
    	int T = sc.nextInt();
    	for(int tc=1; tc<=T; tc++) {
        	int D = sc.nextInt();
        	int H = sc.nextInt();
        	int M = sc.nextInt();
        	int result = (M-11) + (H-11)*60 + (D-11)*60*24;
        	if( result < 0 ) result = -1;
        	System.out.format("#%d %d\n", tc, result);
        }
        sc.close();
    }
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}