Submission #161850

#TimeUsernameProblemLanguageResultExecution timeMemory
161850boolodifjenulaTuna (COCI17_tuna)Cpython 3
50 / 50
29 ms3428 KiB
from math import * N=int(input()) x=int(input()) z=0 for i in range(N): p1,p2=map(int,input().split()) if abs(p1-p2)<=x: z+=max(p1,p2) else: z+=int(input()) print(z)
#Verdict Execution timeMemoryGrader output
Fetching results...