Problem:


Score: 100 points

Problem Statement

There is a train going from Station A to Station B that costs X yen (the currency of Japan).

Also, there is a bus going from Station B to Station C that costs Y yen.

Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus.

How much does it cost to travel from Station A to Station C if she uses this ticket?

Constraints

1 \leq X,Y \leq 100

Y is an even number.

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If it costs x yen to travel from Station A to Station C, print x.

Sample Input 1

81 58

Sample Output 1

110

The train fare is 81 yen.

The train fare is 58 ⁄ 2=29 yen with the 50% discount.

Thus, it costs 110 yen to travel from Station A to Station C.

Sample Input 2

4 54

Sample Output 2

31



Sample input:
81 58


Sample output:
110

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value

def ume(x):
    x = str(x)
    if len(x) < 6:
        return '0'*(6-len(x)) + x
    return x

def main():
    N, M = mi()

    l = dp2(0, 3, M)
    cnt = [0]*(N+1)
    ans = dp2(0, 2, M)
    for i in range(M):
        p, y = mi()
        l[i][0], l[i][1], l[i][2] = p-1, y, i
        cnt[p] += 1
    for i in range(N):
        cnt[i+1] += cnt[i]

    l.sort(key=lambda x: x[0])
    for i in range(N):
        ichibu = l[cnt[i]:cnt[i+1]]
        ichibu.sort(key=lambda x: x[1])
        for j in range(cnt[i+1]-cnt[i]):
            ans[ichibu[j][2]][0] =ichibu[j][0]+1
            ans[ichibu[j][2]][1] =j+1
    
    for x, y in ans:
        print(ume(x)+ume(y))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def nyu():
    N, M = map(int, input().split())
    S = [list(input().split()) for i in range(M)]
    return N,M,S

def kansu(N,M,S):

    S_tmp=[]
    for i in range(M):
        tmp = [int(S[i][0]),int(S[i][1]),0,i]
        S_tmp.append(tmp) 
    S_tmp.sort()
    tmp = S_tmp[0][0]
    cnt = 1

    for i in range(M):
        if tmp == int(S_tmp[i][0]):
            S_tmp[i][2] = cnt
            cnt += 1
        else :
            tmp = S_tmp[i][0]
            S_tmp[i][2] = 1
            cnt = 2
#    print(S_tmp)
    S_tmp = sorted(S_tmp, key=lambda x: x[3])
#    print(S_tmp)
    for i in range(M):
        print(str(S_tmp[i][0]).zfill(6),str(S_tmp[i][2]).zfill(6),sep='')
    



    # for m1 in range(M):
    #     cnt = 1
    #     tmp_m1 = S[m1][0]
    #     tmp_m2 = S[m1][1]
    #     for m2 in range(M):
    #         if S[m2][0] == tmp_m1 and S[m2][1] < tmp_m2:
    #             cnt = cnt + 1
    #     print(str(S[m1][0]).zfill(6),str(cnt).zfill(6),sep='')


N,M,S = nyu()
kansu(N,M,S)
#print(S)

Submission status: Runtime Error

Solution code:
X, Y = int(input().split)
T=0
T=Y/2
print(X+T)

Submission status: Runtime Error

Solution code:
input()
T,A=map(int,input().split())
h= [abs(A-(T-int(i)*0.006))for i in input().split()]
print(h.index(min(h))+1)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
print(int(x+y/2)

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split()
print(int(X+y/2))

Submission status: Runtime Error

Solution code:
X, Y = map(int, input())
print(X+(Y/2))

Submission status: Runtime Error

Solution code:
X,Y = int(input())
print(X + Y / 2)

Submission status: Runtime Error

Solution code:
x,y = map(int, input().split())
print(x+(y//2)

Submission status: Runtime Error

Solution code:
X,Y = map(int, input().split())
print(int(X+(Y/2))

Submission status: Runtime Error

Solution code:
print(eval(input().replace(" ", +) + "//2"))

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
height = list(map(int, input().split()))
temperature = list(abs(T - i * 0.006) for i in height)
print(temperature.index(min(temperature)) + 1)

Submission status: Runtime Error

Solution code:
a,b=map(int.input().split())
print(a + b//2)

Submission status: Runtime Error

Solution code:
x = map(int, input().split(' '))
print(int(x[0]+x[1]/2))

Submission status: Runtime Error

Solution code:
a,b = int(input())
print(a+(b//2))

Submission status: Runtime Error

Solution code:
print(int(input())+(int(input())//2))

Submission status: Runtime Error

Solution code:
n = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#print(h)
l =[]
for i in range(n):
  a = T - h[i]*0.006
 # print(a)
  b = abs(a-A)
  l.append(b)
  #print(l)
c = l.index(min(l))
print(c+1)

Submission status: Runtime Error

Solution code:
#入力
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

#空のリストを作る事で，求めた値をそのリストに追加していく
#そして，そのリストの中から一番値が近いものをprintする
l = []
for i in range(N):
    a = T - H[i]*0.006
    b = abs(a-A)
    l.append(b)

c = l.index(min(l))
print(c +1)

#空のリストの作成方法
#l = []
#l.append(引数)

Submission status: Runtime Error

Solution code:
#入力
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

#空のリストを作る事で，求めた値をそのリストに追加していく
#そして，そのリストの中から一番値が近いものをprintする
l = []
for i in range(N):
    a = T - H[i]*0.0006
    b = abs(a-A)
    l.append(b)

c = l.index(min(l))
print(c +1)

#空のリストの作成方法
#l = []
#l.append(引数)

Submission status: Runtime Error

Solution code:
n = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#print(h)
l =[]
for i in range(n):
  a = T - h[i]*0.006
 # print(a)
  b = abs(a-A)
  l.append(b)
  #print(l)
c = h.index(h[l.index(min(l))])
print(c+1)

Submission status: Runtime Error

Solution code:
n = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#print(h)
l =[]
for i in range(n):
  a = T - h[i]*0.006
  print(a)
  b = abs(a-A)
  l.append(b)
  print(l)
c = h.index(h[l.index(min(l))])
print(c+1)

Submission status: Runtime Error

Solution code:
s = input()
src = s.split("\n")

numberOfPlace = int(src[0])
standardTemparature, bestTemparature = tuple(src[1].split(" "))
placeList = src[2].split(" ")

temparetureDifferencesList = list(map(lambda evelation: int(standardTemparature) - ( int(evelation) * 0.006 )), placeList)
theBestPlace = temparetureDifferencesList.sort()[0]

print(theBestPlace)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

ans = 1
ans_t = abs(A-(T-H[1]*0.006))
for i in range(N):
    if abs(A-(T-H[i]*0.006)) < ans_t:
        ans = i+1
        ans_t = abs(A-(T-H[i]*0.006))
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

L = [abs(int(A-(T-i*0.006))) for i in H]
print(L.index(min(L))+1)

Submission status: Runtime Error

Solution code:
x,y = map(int,inpu().split())
print(x+int(y/2))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split)
print(a+b/2)

Submission status: Runtime Error

Solution code:
x,y=map(input().split())
print(x+y//2)

Submission status: Runtime Error

Solution code:
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

ans_num = 1
ans_para = h[0]
for i, r in enumerate(h):
    deg = t - (r * 0.006)
    ans_para_deg = t - (ans_para * 0.006)
    if abs(a - ans_para_deg) >= abs(a - deg):
        ans_para = r
        ans_num = i+1
print(ans_num)

Submission status: Runtime Error

Solution code:
x = X + Y/2
print(x)

Submission status: Runtime Error

Solution code:
import bisect

def main():
  N,M = map(int,input().split())
  pref = [[] for i in range(N)]
  id = [[]] * M
  
  for i in range(M):
    p,y = map(int,input().split())
    id[i] = [p,y]
    pref[p - 1].append(y)
    #pref[p - 1] = sorted(pref[p - 1])
  
  for i in range(N):
    pref[i] = sorted(pref[i])
  
  orders = [0] * N
  
  for i in range(M):
    p = id[i][0] - 1
    y = id[i][1]
    order = str(bisect.bisect_left(pref[p],y) + 1)
    city = str(p + 1)
    ID = ""
    ID += "0" * (6 - len(city)) + city + "0" * (6 - len(order)) + order
    print(ID)

if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
import bisect

def main():
  N,M = map(int,input().split())
  pref = [[] for i in range(N)]
  id = [[]] * M
  
  for i in range(M):
    p,y = map(int,input().split())
    id[i] = [p,y]
    pref[p - 1].append(y)
    #pref[p - 1] = sorted(pref[p - 1])
  
  for i in range(N):
    pref[i] = sorted(pref[i])
  
  orders = [0] * N
  
  for i in range(M):
    p = id[i][0] - 1
    y = id[i][1]
    order = str(bisect.bisect_left(pref[p],y) + 1)
    city = str(p + 1)
    ID = ""
    ID += "0" * (6 - len(city)) + city + "0" * (6 - len(order)) + order
    print(ID)

if __init__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
print(a+b/2)

Submission status: Runtime Error

Solution code:
x, y = list(map(int, input.split()))
print(x + y // 2)

Submission status: Runtime Error

Solution code:
a,b = map(int(), input().split())
print(a+b/2)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
*h,=map(int,input().split())
tmp=[]
for i in h:
	tmp.append(t-i*0.006)
tmp_abs=[abs(j-a) for j in tmp]
print(tmp_abs.index(min(tmp_abs))+1)

Submission status: Runtime Error

Solution code:
a,b=int(input())
print(a+(b//2))

Submission status: Runtime Error

Solution code:
x,y = map(int,input())
print(x+y//2)

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())
print(x + y/c)

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())

print(x+y//c)

Submission status: Runtime Error

Solution code:
n = int(input())
t,a = map(int,input().split())
l = []
ans = []

l = list(map(int,input().split()))
    
for i in range(n):
    ans.append(a - t - (l[i] * 0.006))

print(ans.index(min(ans,key=abs))+1)

Submission status: Runtime Error

Solution code:
print(int(input()) + int(input())//2)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split(" "))

# for i in range(M):
#     P_num,Y_num = map(int,input().split(" "))
#     P.append(P_num)
#     Y.append(Y_num)

Py = [input().split(" ") for i in range(M)]
P = [int(Py[i][0]) for i in range(len(Py))]
Y = [int(Py[i][1]) for i in range(len(Py))]

#辞書を作成
city = []

for i in range(M):
    city.append({"prefecture":P[i], "year":Y[i]})

#識別番号を作成

#県iのの市のデータのみを集める
order = []
calc_city_num = {}
for i in range(1,N+1):
    for j in range(len(city)):
        if city[j]["prefecture"] == i:
            calc_city_num.setdefault(f"{j+1}",city[j]["year"])


    #この中で創設時期が早い順に並べ替え、つまり、yearを並び替え
    order.append(sorted(calc_city_num.items(), key=lambda x:x[1]))
    calc_city_num.clear()


#県iの市の番号を作成する
for i in range(1,len(order)+1):
    for j in range(len(order[i-1])):
        result = str(str(i).zfill(6) + str(j+1).zfill(6))
        city[int(order[i-1][j][0])-1].setdefault("num",result)

for i in range(M):
    print(city[i]["num"])

Submission status: Runtime Error

Solution code:
x,y=map(int(input().split())
print(x+y//2)

Submission status: Runtime Error

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


n,k = map(int,input().split())

print(x+y//2)

Submission status: Runtime Error

Solution code:
x,y = (int, input().split())
print(x+y//2)

Submission status: Runtime Error

Solution code:
A - Discount Fare

Submission status: Runtime Error

Solution code:
N = int(input())
T = int(input())
A = int(input())
H = list(map(int, input().split()))

ans_l = []

for i in range(N):
    mater = H[i]
    Temp = (T - (mater*0.006))
    ans = abs(A - Temp)
    ans_l.append(ans)
 
ans_mini = min(ans_l)

ans_posi =[]

for h in range(N):
    if ans_l[h] == ans_mini:
        ans2 = h+1
        ans_posi.append(ans2)


for j in ans_posi:
    print(j,end="")

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = list(map(int, input().split()))
H = [int(i) for i in input().split()]
diff = [abs(A-(T-0.006*i)) for i in H]
print(diff.index(min(diff))+1)

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
X, Y = a[0], a[1]
print(X + int(Y / 2))

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
X, Y = a[0], a[1]
print(X + int(Y // 2))

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
X, Y = a[0], a[1]
print(X + Y // 2)

Submission status: Runtime Error

Solution code:
X, Y = input().split()

print(X + Y // 2)

Submission status: Runtime Error

Solution code:
print(int(input())+int(input())//2)

Submission status: Runtime Error

Solution code:
    x, y = map(int, input().split())
    print(int(x + (y/2)))

Submission status: Runtime Error

Solution code:
import sys
from operator import itemgetter


def main():
    input = sys.stdin.readline
    n, m = map(int, input().split())

    p_y = [list(map(int, input().split())) for _ in range(m)]

    sorted_p_y = sorted(p_y, key=itemgetter(0, 1))

    for row in p_y:
        count = 0
        for sorted_row in sorted_p_y:
            if row[0] == sorted_row[0]:
                count += 1

            if row[0] == sorted_row[0] and row[1] == sorted_row[1]:
                print(str(row[0]).zfill(6), str(count).zfill(6), sep="")
                break


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())

p_y = []
for _ in range(m):
    p_y.append(list(map(int, input().split())))

sorted_p_y = sorted(p_y, key=lambda x: (x[0], x[1]))

for i in range(m):
    count = 0
    for j in range(m):
        if p_y[i][0] == sorted_p_y[j][0]:
            count += 1

        if p_y[i][0] == sorted_p_y[j][0] and p_y[i][1] == sorted_p_y[j][1]:
            print(str(p_y[i][0]).zfill(6), str(count).zfill(6), sep="")

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
Hs = [int(H) for H in input().split()]
min_diff = 10e9
ans = 0
for i, H in enumerate(Hs):
    T_at_H = T - H*0.006
    diff = abs(A - T_at_H)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1
print(ans)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
T, A = map(int, input().split())
Hs = [int(H) for H in input().split()]
min_diff = 10e9
ans = 0
for i, H in enumerate(Hs):
    T_at_H = T - H*0.006
    diff = abs(A - T_at_H)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1
print(ans)

Submission status: Runtime Error

Solution code:
x,y = map(int,input())
print(int(x+y/2))

Submission status: Runtime Error

Solution code:
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))
li=[]
for h in H:
    li.append(abs(A-(T-0.006*h)))
print(li.index(min(li))+1)

Submission status: Runtime Error

Solution code:
n = int(input())
T, A = map(int, input().split())
nl = list(map(int, input().split()))

s = [abs(T - i*0.06-A) for i in nl]
print(s.index(min(s)) + 1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
print(a + b / 2)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10**5+1
num=0
for i in range(n):
    if TA>abs(a-(t-h[i]*0.006))>0:
        num=i+1
        TA=abs(a-(t-h[i]*0.006))
 
print(num)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10**10
num=0
for i in range(n):
    if TA>abs(a-(t-h[i]*0.006))>0:
        num=i+1
        TA=abs(a-(t-h[i]*0.006))
 
print(num)

Submission status: Runtime Error

Solution code:
x,y = map(int, input())
print(x + int(y/2))

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10**5+1
for i in range(n):
    if TA>abs(a-t+h[i]*0.006):
        ans=i+1
        TA=abs(a-t+h[i]*0.006)

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
TA=10**5+1
num=0
for i in range(n):
    if TA>abs(a-(t-h[i]*0.006)):
        num=i+1
        TA=abs(a-(t-h[i]*0.006))

print(num)

Submission status: Runtime Error

Solution code:
x, y = int(input())
print(x + y//2 )

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
#import numpy as np
n,m = map(int, input().split())
i=0
lst = []
while i < m: 
    l = map(int, input().split())
    lst.append(list(l))
    i+=1

sort_lst = sorted(lst)
i=1
res=[]
for i in range(1,n+1):
    j=1
    for k in sort_lst:
        if i == k[0]:
            res.append([str(k[0])+str(k[1]),str(k[0]).rjust(6,'0') + str(j).rjust(6,'0')])
            j+=1

#ans
for ans in lst:
    for res in sort_lst:
        if str(ans[0])+str(ans[1]) == res[0]:
            print(res[1])

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
x=[]
for i in range(n):
    x.append(abs(a-(t-h[i]*0.006)))
print(x.index(min(x))+1)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
nums = list(map(int, input().split()))

diff = [0]*N

for i in range(0, N):
    diff[i] = abs(A - (T - nums[i] * 0.006))

print(diff.index(min(diff)) + 1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input(),split())
print(a+b//2)

Submission status: Runtime Error

Solution code:
H,W,K = map(int, input().split())
# HとWは道の数を決定
dp = [[0]*W for _ in range(H+1)]
dp[0][0] = 1
if W==1:
  print(1)
else:
  for i in range(H):
    for j in range(2**(W-1)):
      flag = True
      for k in range(W-1):
        if k != W-2:
          # 二桁連続で1の場合は処理を省く
          if (((j >> k) & 1)&((j >> k+1) & 1)):
            flag = False
            break
      if flag:
        #print(bin(j)[2:].zfill(W-1))
        l = 0
        while l < W:
          if ((j >> l) & 1):
            dp[i+1][l] += dp[i][l+1]
            dp[i+1][l+1] += dp[i][l]
            l += 1
          else:
            dp[i+1][l] += dp[i][l]
          l += 1
        #print('pre',dp[i])
        #print(dp[i+1])

  print(dp[-1][K-1]%(1000000007))

Submission status: Runtime Error

Solution code:
#Palace
N,T,A,*H = map(int,open(0).read().split())
A = [A]*N
for i in range (N):
    H[i] = abs((T-H[i]*0.006)-A[i])
print(H.index(min(H)+1))

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split)
print(a+b//2)

Submission status: Runtime Error

Solution code:
s=input().sprit()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(a)

Submission status: Runtime Error

Solution code:
x=input('X')
y=input('Y')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)

Submission status: Runtime Error

Solution code:
x=input('AからBの運賃')
y=input('BからCの運賃')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)

Submission status: Runtime Error

Solution code:
print(int(input()) + (int(input())//2))

Submission status: Runtime Error

Solution code:
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
minabs = 10**10

for i in range(n):
  if abs(a-(t-h[i]*0.006)) < minabs:
    minabs = abs(a-(t-h[i]*0.006))
    j = i

print(j+1)

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
print(x + (y//2))

Submission status: Runtime Error

Solution code:
X,Y=int(input().split())
print((X+Y)//2)

Submission status: Runtime Error

Solution code:
X,Y=int(input())
print((X+Y)//2)

Submission status: Runtime Error

Solution code:
X,Y=int(input())
print(X+Y//2)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
base = []
for i in range(M):
  (a, b) = map(int, input().split())
  base.append((a, b, i))
sorted_target = sorted(base) 

prefecture_index = sorted_target[0][0]

i=0
result = {}

for target in sorted_target:
  if prefecture_index == target[0]:
    i+=1
  else:
    prefecture_index = target[0]
    i = 1
  result[target[2]] = [prefecture_index, i]

for i in range(M):
  print("{:0=6}{:0=6}".format(result[i][0], result[i][1]))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
base = []
for i in range(M):
  (a, b) = map(int, input().split())
  base.append((a, b, i))
sorted_target = sorted(base) 

prefecture_index = sorted_target[0][0]

i=1
result = {}

for target in sorted_target:
  if prefecture_index == target[0]:
    i+=1
  else:
    prefecture_index = target[0]
    i = 1
  result[target[2]] = [prefecture_index, i]

for i in range(M):
  print("{:0=6}{:0=6}".format(result[i][0], result[i][1]))

Submission status: Runtime Error

Solution code:
import numpy as np

N, M = map(int, input().split())
base = [[int(l) for l in input().split()] for i in range(M)]
sort_target = np.sort(base, axis=0).tolist()

prefecture_index = sort_target[0][0]
i=0
result = []
for target in sort_target:
  i = i + 1 if prefecture_index == target[0] else 1
  prefecture_index = target[0]
  result.append([base.index(target), "{:0=6}{:0=6}".format(target[0], i)])
sorted_result = sorted(result)

for result in sorted_result:
  print(result[1])

Submission status: Runtime Error

Solution code:
import sys
if __name__ == "__main__":
    N, M = map(int, sys.stdin.readline().split())
    P = [0] * (N + 1)
    C = [0] * M

    for m in range(M):
        p, y = map(int, input().split())
        C[m] = [m, p, y, 0]
    C.sort(key=lambda x :x[2])

    for c in C:
        P[c[1]] += 1
        c[3] = P[c[1]]
    C.sort(key=lambda x :x[0])

    for c in C:
        print("{}{}".format(str(c[1]).zfill(6), str(c[3]).zfill(6)))

Submission status: Runtime Error

Solution code:
N=int(input())

T,A=map(int,input().split())

min=5000

H=[int(x) for x in input().split()]

for i in range(N):
    #print(abs(A-(T-H[i]*0.006)))
    if abs(A-(T-H[i]*0.006)) <= min:
        min=abs(A-(T-H[i]*0.006))
        buf=i+1

print(buf)

Submission status: Runtime Error

Solution code:
input()
t,a = map(int,input().split())
b = list(map(int,input().split()))
ans = []

for x in range(n):
    d = abs(a - (t - h[i]*0.006))
    ans.appemd(d)

print(ans.index(min(ans))+1)

Submission status: Runtime Error

Solution code:
def solve():
    x, y = map(int, input())
    return x + y // 2


if __name__ == "__main__":
    print(solve())

Submission status: Runtime Error

Solution code:
print (int(input()) + int(input())//2)

Submission status: Runtime Error

Solution code:
n = input()
for i in [0, 1, 2]:
  if n[i] == '1':
    n[i] == '9'
  if n[i] == '9':
    n[i] == '1'
print(int(n))

Submission status: Runtime Error

Solution code:
import bisect
n,m=map(int, input().split())
pl=[0]*100000
yl=[0]*100000
ol=[[] for i in range(100001)]
for i in range(m):
    pl[i],yl[i] = map(int, input().split())
    ol[pl[i]].append(yl[i])
for i in range(n):
    ol[pl[i]].sort()
for i in range(m):
    x = bisect.bisect_right(ol[pl[i]], yl[i])
    print("%06d%06d" % (pl[i], x))

Submission status: Runtime Error

Solution code:
import numpy as np

N,M = map(int,input().split(" "))

p_ls = []
y_ls = []
for _ in range(M):
    p,y = map(int,input().split(" "))
    p_ls.append(p)
    y_ls.append(y)

p_ar = np.array(p_ls)
y_ar = np.array(y_ls)
x_ar = np.zeros(len(p_ls))

# 市ごとに連続するようにする
p_ind = p_ar.argsort()

ind = 0

while ind < M:
    d = 0
    while ind+d < M-1 and p_ar[p_ind[ind]] == p_ar[p_ind[ind+d+1]]:
        d+=1
    tmp_x = y_ar[p_ind[ind:ind+d+1]].argsort()+1
    x_ar[p_ind[ind:ind+d+1]] = tmp_x
    ind = ind + d + 1
for i in range(M):
    print('%06d'%p_ar[i] + '%06d'%x_ar[i])

Submission status: Runtime Error

Solution code:
X,Y=int(input())
print(int(X+Y/2))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
P = [0] * M
Y = [0] * M
check = [[] for i in range(N)]

for i in range(M):
    P[i], Y[i] = map(int, input().split())
    check[P[i]-1].append(Y[i])

for i in range(N):
    check[i].sort()

for i in range(M):
    tmp1 = ('00000' + str(P[i]))[-6:] 
    tmp2 = ('00000' + str(check[P[i]-1].index(Y[i])+1))[-6:]
    tmp = tmp1 + tmp2
    print(tmp)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
prev=[];ord=[[]for _ in range(n+1)]
for _ in range(m):
  a,b=map(int,input().split())
  prev.append([a,b])
  ord[a].append(b)
for i in range(n+1):
  if i!=[]:ord[i]=sorted(ord[i])
for [x,y] in prev:
  ind=ord[x].index(y)+1
  print("%06d"%x+"%06d"%ind)

Submission status: Runtime Error

Solution code:
x,y = map(int,input())

print(x+y//2)

Submission status: Runtime Error

Solution code:
a,b=map(int,input.split());print(a+b/2)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

ans = 0
min_diff = 10**5
for i in range(N):
  if abs((T - H[i]*0.006) - A) < min_diff:
    ans = i+1
    min_diff = abs((T - H[i]*0.006) - A)
print(ans)

Submission status: Runtime Error

Solution code:
X, Y = map(int, input())
print((X+Y)//2)

Submission status: Runtime Error

Solution code:
X, Y = int(input())
print((X+Y)//2)

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    x, y = LI()
    print(x+y//2)
    return

#B
def B():
    return

#C
def C():
    n, m = LI()
    py = LIR(m)
    pya = py[::1]
    py.sort(key=lambda x: x[1])
    city = [1 for i in range(n)]
    dicity = {}
    for p, y in py:
        dicity[(p,y)] = city[p-1]
        city[p-1] += 1    
    for p, y in pya:
        a = "00000" + str(p)
        a = a[-6:]
        b = "00000" + str(dicity[(p, y)])
        b = b[-6:]
        print(a+b)

    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    C()

Submission status: Runtime Error

Solution code:
x, y = map(int, input())
print(x + y // 2)

Submission status: Runtime Error

Solution code:
X Y = map(int, input().split())

print(X + int(Y / 2))

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
print(a+b/2)

Submission status: Runtime Error

Solution code:
N=int(input())
T, A=map(int, input().split())
N=list(map(int,input().split()))
temp=list(map(lambda x: abs(A-(T-0.006*x)),N))
print(temp.index(min(temp))+1)

Submission status: Runtime Error

Solution code:
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))
B = list(range(N))
def Temp(x):
  Temp = T-0.006*x
  return(Temp)
for i in range(N):
  B[i] = abs(Temp(H[i])-A)
ans = min(B)
print(B.index(ans)+1)

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())

print(int(x + y / 2))
x, y = map(int, input().split())

print(int(x + y / 2))

Submission status: Runtime Error

Solution code:
X, Y = int(input().split())
print(X+Y//2)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())

print(a+int(b/2))

Submission status: Runtime Error

Solution code:
import numpy as np
N=int(input())
T,A=(int(i) for i in input().split())
H=[int(i) for i in input().split()]
T=np.array([T for i in range(N)])
print(abs(A-(T-H*0.006)).argmin())

Submission status: Runtime Error

Solution code:
n = int(input())
t, a =  map(int,input().split())
h = list(map(int,input().split()))
b = 0

b = t-a
c = b-0.006*h[0]
best = 0
for i in range(0,len(h)):
    if min(abs(b-0.006*h[i]),abs(c)) == abs(b-0.006*h[i]):
        c = abs(b-0.006*h[i])
        best = i

print(best+1)

Submission status: Runtime Error

Solution code:
n=int(input())
t,a=map(int,input().split())
h=list(map(int,input().split()))
for i in range(n):
  h[i]=t-h[i]*0.006
d=abs(a-h[0])
c=1
for i in range(1,n):
  if d>abs(a-h[i]):
    c=i+1
    d=abs(a-h[i])
print(c)

Submission status: Runtime Error

Solution code:
X,Y = map(int(input().split())
print(int(X + Y /2))

Submission status: Runtime Error

Solution code:
X,Y = int(input())
print(int(X + Y /2))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
from collections import defaultdict
d = defaultdict(list)
l = [[] for i in range(M)]
for i in range(M):
    P,Y = map(str, input().split())
    P = "0" * (6-len(P)) + P
    d[P] += [int(Y)]
    l[i] = [P,int(Y)]
for i in range(M):
    tmp = str((sorted(d[l[i][0]]).index(l[i][1]))+1)
    print(l[i][0] + "0" * (6-len(tmp)) + tmp)

Submission status: Runtime Error

Solution code:
x,y=int,input().split()
print(int.(x+y/2))

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = map(int, input().split())
H_list = list(map(int, input().split()))

pre = A
'''
3
21 -11
81234 52141 94124
'''
for i, h in enumerate(H_list):
    if i == 0:
        ans = i
        pre = T - h * 0.006
        continue
    kion = T - h * 0.006
    if abs(A - kion) < abs(A - pre):
        #print(kion)
        #print(pre)
        #print(abs(A - kion),'kion')
        #print(abs(A - pre),'pre')
        ans = i
print(ans + 1)

Submission status: Runtime Error

Solution code:
X,Y=map(int,input().split)
print(int(X+Y/2))

Submission status: Runtime Error

Solution code:
X,Y=map(int,input().split);
print(int(X+Y/2));

Submission status: Runtime Error

Solution code:
X,Y=map(int,input().split);
print(int(x+Y/2));

Submission status: Runtime Error

Solution code:
n = int(input())
t,a = map(int, input().split())
h = list(map(int, input().split()))

for i in range(n):
	h[i] = abs(a-(t - h[i]*0.006))

print(h.index(min(h))+1)

Submission status: Runtime Error

Solution code:
x,y = map(int, input().split())
print(int(x+y/2)

Submission status: Runtime Error

Solution code:
X, Y = map(int, input())
print(X + Y/2)

Submission status: Runtime Error

Solution code:
X, y = map(int, input().split())

print(x + y // 2)

Submission status: Runtime Error

Solution code:
X,Y=map(int,input().split())
X=input(10)
Y=input(30)
answer=X+(Y/2)

Submission status: Runtime Error

Solution code:
n = input()
x,y = map(int,input().split())
y = y/2
ans = x + y
print(ans)

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b=map(int,input().splpit())
print(a+int(b/2))