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
- 알고리즘
- BFS
- dfs
- COS PRO
- 건강
- 문제해결
- 백준
- 문자열
- greedy
- 운동기록
- MySQL
- 투포인터
- SQL
- 코테
- oracle
- SWEA
- DP
- Java
- db
- 시뮬레이션
- 코딩테스트
- 프로그래머스
- 러닝일지
- BOJ
- 이분탐색
- 문제풀이
- 자바
- binary search
- math
- priorityqueue
Archives
- Today
- Total
슈콩
[SWEA] 세영이의 SEM력 연도 본문


[문제]
https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWooplJ60l8DFARx
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 S = Integer.parseInt(st.nextToken());
int E = Integer.parseInt(st.nextToken());
int M = Integer.parseInt(st.nextToken());
int s = 1; int e = 1; int m = 1;
int result = 1;
while(!(s==S && e==E && m==M)) {
result++;
s++; e++; m++;
if(s==366) s = 1;
if(e==25) e = 1;
if(m==30) m = 1;
}
System.out.println("#"+tc+" "+result);
}
}
}'Algorithms > SWEA' 카테고리의 다른 글
| [SWEA] 새샘이와 세 소수 (0) | 2025.11.20 |
|---|---|
| [SWEA] 삼삼 트리플 게임 (0) | 2025.11.19 |
| [SWEA] 조 만들기 (0) | 2025.11.19 |
| [SWEA] 2016년 요일 맞추기 (0) | 2025.11.19 |
| [SWEA] 소득 불균형 (0) | 2025.11.19 |