Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- priorityqueue
- 건강
- 문자열
- 문제풀이
- SQL
- DP
- SWEA
- MySQL
- 시뮬레이션
- db
- dfs
- 투포인터
- greedy
- 자바
- 이분탐색
- BFS
- 운동기록
- 코딩테스트
- 문제해결
- math
- 코테
- COS PRO
- 프로그래머스
- BOJ
- 알고리즘
- binary search
- oracle
- Java
- 러닝일지
- 백준
Archives
- Today
- Total
슈콩
[SWEA] 태혁이의 사랑은 타이밍 본문

[문제]
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWLv6mx6htoDFAVV
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
[소스 코드]
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
int T = Integer.parseInt(br.readLine());
for(int tc=1;tc<=T;tc++) {
st = new StringTokenizer(br.readLine());
int d = Integer.parseInt(st.nextToken());
int h = Integer.parseInt(st.nextToken());
int m = Integer.parseInt(st.nextToken());
int base = 11*24*60 + 11*60 + 11;
int cmp = d*24*60 + h*60 + m;
int result = cmp - base;
if(result<0) {
System.out.println("#"+tc+" -1");
}
else {
System.out.println("#"+tc+" "+result);
}
}
}
}'Algorithms > SWEA' 카테고리의 다른 글
| [SWEA] 5일차 - GNS (0) | 2025.11.14 |
|---|---|
| [SWEA] 삼성시의 버스 노선 (0) | 2025.11.14 |
| [SWEA] 다트 게임 (0) | 2025.11.14 |
| [SWEA] 숫자가 같은 배수 (0) | 2025.11.13 |
| [SWEA] 상원이의 연속 합 (0) | 2025.11.12 |