목록BOJ_백준 (122)
haju__log
https://www.acmicpc.net/problem/2476 2476번: 주사위 게임 첫째 줄에는 참여하는 사람 수 N이 주어지고 그 다음 줄부터 N개의 줄에 사람들이 주사위를 던진 3개의 눈이 빈칸을 사이에 두고 각각 주어진다. www.acmicpc.net ✅ 내 코드 n=int(input()) total=0 result=0 for _ in range(n): a,b,c=map(int,input().split()) maxn=max(a,b,c) if a==b and b==c: same=10000+a*1000 if result < same: result = same elif a!=b and a!=c and b!=c : differ=maxn*100 if result < differ: result = di..
https://www.acmicpc.net/problem/10699 10699번: 오늘 날짜 서울의 오늘 날짜를 출력하는 프로그램을 작성하시오. www.acmicpc.net ✅datetime 모듈 = 날짜와 관련된 데이터를 다룰 때 datetime이라는 모듈을 import 해야한다. ✅strftime() 메소드 = 원하는 날짜 형식대로 출력해준다. = string format time ✅ %Y: 년을 길게 숫자로 표시 (%y: 년을 짧게 숫자로 표시) ✅ %m: 월을 숫자로 표시 ✅ %d: 일을 숫자로 표시 import datetime now=datetime.datetime.now() print(now.strftime("%Y-%m-%d"))
https://www.acmicpc.net/problem/2935 2935번: 소음 수업 시간에 떠드는 두 학생이 있다. 두 학생은 수업에 집중하는 대신에 글로벌 경제 위기에 대해서 토론하고 있었다. 토론이 점점 과열되면서 두 학생은 목소리를 높였고, 결국 선생님은 크게 www.acmicpc.net a=int(input()) s=input() b=int(input()) if s=='*': print(a*b) else: print(a+b)
https://www.acmicpc.net/problem/10102 10102번: 개표 입력은 총 두 줄로 이루어져 있다. 첫째 줄에는 심사위원의 수 V (1 ≤ V ≤ 15)가 주어지고, 둘째 줄에는 각 심사위원이 누구에게 투표했는지가 주어진다. A와 B는 각각 그 참가자를 나타낸다. www.acmicpc.net v=int(input()) s=list(input()) if s.count('A')>s.count('B'): print('A') elif s.count('A')