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:
N,M = map(int, input().split())

PY_list = []
for num,i in enumerate(range(M)):
    p,y = map(int, input().split())
    PY_list = PY_list + [(num,p,y),]

rec = []
for i in range(N):
    cities = []
    for k in PY_list:
        if k[1] == i+1:
            cities = cities + [k,]
    cities = sorted(cities, key=lambda x:x[2])

    rec_list = []
    for num,k in enumerate(cities):
        rec_list = rec_list + [(k[0],str(k[1]).zfill(6) + str(num+1).zfill(6)),]

    rec = rec + rec_list
rec = sorted(rec, key=lambda x:x[0])

for s in rec:
    print(s[1])

Submission status: Runtime Error

Solution code:
N,M = (int(i) for i in input().split())

clist = []
for _ in range(M):
    p, y = (int(i) for i in input().split())
    clist.append((p,y))

pp = []
for o in range(N):
    pp.append([])

for p, y in clist:
    pp[p-1].append(y)

spp = []
index = 0
for _ in range(N):
    spp.append(sorted(pp[index]))
    index = index + 1

for p, y in clist:
    num = spp[p-1].index(y) + 1
    print('%06d' % p + '%06d' % num)

Submission status: Runtime Error

Solution code:
from sys import stdin
from queue import PriorityQueue

PREFEC, CITIES = list(map(int, stdin.readline().split()))
pref = {str(key): PriorityQueue() for key in range(1, PREFEC+1)}
city = dict()
out = [0] * CITIES
for i in range(CITIES):
    p, c = stdin.readline().split()
    pref[p].put(c)
    dic = p + '0' + c
    city[dic] = i

for j in range(1, PREFEC+1):
    i = str(j)
    pref_index = 1
    while not pref[i].empty():
        si = pref[i].get()
        temp = i + '0' + si
        index = city[temp]
        sy = str(pref_index)
        p = i

        while len(p) != 6:
            p = '0' + p
        while len(sy) != 6:
            sy = '0' + sy

        out[index] = p + sy

        pref_index += 1

for o in out:
    print(o)

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-


def ID():
    N, M = [int(n) for n in input().split()]
    lst = [[n for n in input().split()] for _ in range(M)]
    sorted_lst = sorted(lst, key=lambda x: int(x[1]))
    memo = {}
    result = {}
    for p, x in sorted_lst:
        if p not in memo:
            memo[p] = 1
        else:
            memo[p] += 1
        higher = p.zfill(6)
        lower = "{0:06d}".format(memo[p])
        result[p + x] = higher + lower

    for p, x in lst:
        print(result[p+x])


if __name__ == '__main__':
    ID()

Submission status: Runtime Error

Solution code:
f=input.split(" ")
x=f[1]
y=f[2]
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
f=input().split(" ")
x=f[1]
y=f[2]
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
f=input()
number=f.split(" ")
x=number[1]
y=number[2]
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
f=input("string is:")
number=f.split(" ")
x=number[1]
y=number[2]
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
N = int(input())
T, A = (int(i) for i in input().split())
H = [int(i) for i in input().split()]

H_T = [0 for i in range(len(H))]
for i in range(len(H)):
    H_T[i] = float(T) - float(H[i])*0.006

min = 1000
index = 0
for i in range(len(H_T)):
    if(abs(H_T[i] - A) < min):
        index = i
        min = abs(H_T[i] - A)
print(index+1)

Submission status: Runtime Error

Solution code:
x=input("X:")
y=input("Y:")
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
t = int(input())
a,b = map(int, input().split())
ss = list(map(int, input().split()))
p = 0
mi= 99999999999999

for i in range(len(ss)):
    if mi > abs(b - (a - 0.006*ss[i])):
        p = i
        mi = abs(b - (a - 0.006*ss[i]))
print(p+1)

Submission status: Runtime Error

Solution code:
x=int(input("X:"))
y=int(input("Y:"))
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
from sys import stdin

num1=int(stdin.readline())
num2=int(stdin.readline())
print(num1+int(num2/2))

Submission status: Runtime Error

Solution code:
x=int(input("X:"))
y=eval(input("Y:"))
z=x+y/2
print(z)

Submission status: Runtime Error

Solution code:
num1=int(input())
num2=int(input())
num3=num2/2
print(num1+num3)

Submission status: Runtime Error

Solution code:
x=int(stdin.readline().rstrip())
y=int(stdin.readline().rstrip())
print(x+y/2)

Submission status: Runtime Error

Solution code:
n = int(input())
t, a = map(int,input().split())
li = list(map(int,input().split()))
n_temp = 2147483647
answer = 2147483647
for idx, temp in enumerate(li):
    i_temp = int(t - temp * 0.006)
    if (abs(a - n_temp) > abs(a -i_temp)):
        n_temp = i_temp
        answer = idx

print(answer+1)

Submission status: Runtime Error

Solution code:
x=stdin.readline().rstrip()
y=stdin.readline().rstrip()
print(x+y/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
t,a = map(int,input().split())
temp = list(map(int,input().split()))
tmp = 10**9
index= 1

for i in temp:
  if abs(a- (t - tmp)) > abs(a- (t - i * 0.006)):
    tmp = t - i * 0.006
    index = temp.index(i)+1


print(index)

Submission status: Runtime Error

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

for i in range(a):
  l = abs(b[0] - c[i]*0.006 - b[1])
  x.append(l)
  
print(x.index(min(x)) + 1)

Submission status: Runtime Error

Solution code:
num1=int(input())
num2=int(input())

print(int(num1)+int(num2/2))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num1=int(input())
num2=int(input())

print(num1+int(num2/2))

Submission status: Runtime Error

Solution code:
number=input()
num_sp=number.split(" ")
num=num_sp[0]+(num_sp[1]/2)
print("%s"%(num))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num1=int(input())
num2=int(input())

price=num1+int(num2/2)
print(price)

Submission status: Runtime Error

Solution code:
x=input().split()

print(x[0]+x[1]/2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=int(a)
d=int(b)/2

e=c+d
print(e)

Submission status: Runtime Error

Solution code:
X, Y = input()
return int(X)+int(Y)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X,Y = map(int, intput().split())
print("{}".format(X+(Y/2)))

Submission status: Runtime Error

Solution code:
X, Y = [int(a) for a in input.split()]
ret = int(X + Y/2 + 0.1)
print(str(ret))

Submission status: Runtime Error

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

print(X+Y/2)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
#include <vector>
#define rep(i, n) for(int i =0; i < n ;i++)
using namespace std;

int main(){
    int x, y;
    cin >> x >> y;
    
    int ans = x + y/2;
    
   
    cout << ans << endl;
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve(X, Y):
	ans = []


	# append output array
    ans.append(str(X + Y // 2))

    # Output according to format
    ans = '\n'.join(ans)
    return ans

# receive inputs
X, Y = list(map(int, input().split()))

# print outputs
print(solve(X, Y))

Submission status: Runtime Error

Solution code:
#coding : UTF-8
x,y = input.split()
print(int(x)+int(y/2))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
4 54

Submission status: Runtime Error

Solution code:
[a,b]=[int(i) for i in input().split()]

print(int(a+b/2)

Submission status: Runtime Error

Solution code:
x,y=input().split()
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:
a = list(map(int,input().split()))
print(a + b/2)

Submission status: Runtime Error

Solution code:
X = int(input())
Y = int(input())
ret = int(X + Y/2 + 0.1)
print(str(ret))