[Python] 백준 #13305- 주유소
·
코딩테스트/백준[Python]
문제 13305번: 주유소 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 도시의 개수를 나타내는 정수 N(2 ≤ N ≤ 100,000)이 주어진다. 다음 줄에는 인접한 두 도시를 연결하는 도로의 길이가 제일 왼쪽 도로부터 N-1 www.acmicpc.net 코드 My answer import sys input=sys.stdin.readline n=int(input()) k=list(map(int,input().split())) cost=list(map(int,input().split())) result=0 start=cost[0] starti=0 for i in range(1,len(cost)): if(cost[i]