반응형
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
- 구현
- CSS
- C Programming
- 심화1
- Beakjoon
- 설명
- 친절한 설명
- 10926
- C
- 알고리즘
- Implemention
- 문제풀이
- HTML
- 입문
- 꾸준히
- Baekjoon
- 정리
- VS
- 문자열
- 초보
- C 언어
- Python
- 백준
- 파이썬
- 10807
- 그리디
- 코드엔진
- implement
- greedy
- c언어
Archives
- Today
- Total
목록비교 (1)
안경잡이 구루루

https://www.acmicpc.net/problem/2530 나: h, m, s = map(int,input().split(' ')) add = int(input()) s = s+ add while s >= 60: m +=1 s = s-60 while m >=60: h +=1 m = m-60 while h >=24: h = h-24 print(h,m,s) 완성된 코드는 위와 같습니다. h, m, s = map(int,input().split(' ')) add = int(input()) 띄어쓰기를 기준으로 변수를 받기위해 split() 함수를 이용했다. 이때 split 함수는 괄호 안의 값을 기준으로 문자열로 나누어 리스트에 저장하는 방식이다. 그래서 사칙연산을 하기위해서는 정수형으로 바꿔주는 map..
파이썬(Python)/문제풀이(백준,BaekJoon)
2023. 3. 30. 20:49