-
[백준] 18108번 : 1998년생인 내가 태국에서는 2541년생?![JAVA]Algorithm/백준[JAVA] 2022. 12. 25. 03:06
https://www.acmicpc.net/problem/18108
# 문제
# 접근방식
- 서기 연도를 저장할 변수 x와 불기 연도를 입력하는 변수 y를 선언한다.
- 변수 y에 scanner를 할당하여 불기 연도를 입력한다.
- 서기 연도는 불기 연도보다 543년 더 적기 때문에 불기 연도에서 543을 빼주어 변수 x에 저장한다.
- 변수 x를 출력하여 불기 연도를 서기 연도로 변환한 결과를 출력한다.
# 소스코드
# 성능
'Algorithm > 백준[JAVA]' 카테고리의 다른 글
[백준] 10430번 : 나머지[JAVA] (0) 2023.02.12 [백준] 3003번 : 킹, 퀸, 룩, 비숍, 나이트, 폰[JAVA] (0) 2022.12.25 [백준] 10926번 : ??![JAVA] (0) 2022.12.25 [백준] 10869번 : 사칙연산[JAVA] (0) 2022.12.25 [백준] 1008번 : A/B[JAVA] (0) 2022.12.25