# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161850 | boolodifjenula | Tuna (COCI17_tuna) | Cpython 3 | 29 ms | 3428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |