백준 25558 내비게이션
https://www.acmicpc.net/problem/25558 25558번: 내비게이션 1번 내비게이션이 안내한 경로는 $(0,0) \rightarrow (11,1) \rightarrow (9,9) \rightarrow (10,10)$으로, 총 거리는 $12 + 10 + 2 = 24$이다. 2번 내비게이션이 안내한 경로는 $(0,0) \rightarrow (1,12) \rightarrow (9,9) \ri www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import sys def cal(a,b,c,d): return abs(c-a)+abs(d-b) n = int(sys.stdin.readline()) distance_list=[] s..
2022. 9. 26.
백준 25591 푸앙이와 종윤이
1 2 3 4 5 6 7 8 9 10 11 12 13 def sol(num1, num2): a = 100 - num1 b = 100 - num2 c = 100 - (a+b) d = a*b q = d//100 r = d % 100 print(a, b, c, d, q, r) print(c+q, r) num1,num2= map(int,input().split()) sol(num1,num2) cs 이 문제는 정수를 입력받고 출력하는 문제입니다 인도? 수학? 나왔다고 해서 겁먹지 마시고 천천히 읽으면 쉽게 풀 수 있어요
2022. 9. 22.
백준 4435 중간계 전쟁
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 def cal_gan(nums): score=0 score_nums=[1,2,3,3,4,10] for i in range(len(nums)): score+=score_nums[i]*nums[i] return score def cal_sauron(nums): score=0 score_nums=[1,2,2,2,3,5,10] for i in range(len(nums)): score+=score_nums[i]*nums[i] return score n=int(input()) for i in range(n): nums_gan = list(map(int,input().split())) nums_sa..
2022. 9. 21.