Problem:


Score : 100 points

Problem Statement

Takahashi wants to print a document with N pages double-sided, where two pages of data can be printed on one sheet of paper.

At least how many sheets of paper does he need?

Constraints

N is an integer.

1 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer.

Sample Input 1

5

Sample Output 1

3

By printing the 1-st, 2-nd pages on the 1-st sheet, 3-rd and 4-th pages on the 2-nd sheet, and 5-th page on the 3-rd sheet, we can print all the data on 3 sheets of paper.

Sample Input 2

2

Sample Output 2

1

Sample Input 3

100

Sample Output 3

50



Sample input:
5


Sample output:
3

Submission status: Runtime Error

Solution code:
n11, n12, n13 = (input().split())
n21, n22, n23 = (input().split())
n31, n32, n33 = (input().split())
lines = [[n11,n12,n13],
         [n21,n22,n23],
         [n31,n32,n33],
         [n11,n21,n31],
         [n12,n22,n32],
         [n13,n23,n33],
         [n11,n22,n33],
         [n13,n22,n31]]
nums = []
for(i in range(int(input()))):
  nums.append(input())
flag = false
for(l in lines):
  if l[0] in nums:
    if l[1] in nums:
      if l[2] in nums:
        flag = True
if flag:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:

a,b,c = list(map(int, input().split()))
d,e,f = list(map(int, input().split()))	
g,h,k = list(map(int, input().split()))
N = int(input())
l = []
for i in range(N):
	e=int(input())
	l.append(e)
L1 = {a,d,g}
L2 = {a,b,c}
L3 = {a,e,k}
L4 = {c,f,k}
L5 = {g,h,k}
L6 = {c,e,g}
for i in range(N):
	for j in range(N):
		for k in range(N):
			s = set([l[i],l[j],l[k]])
			if (s == L1) or (s == L2) or (s == L3) or (s == L4) or (s == L5) or (s == L6) :
				print('Yes')
				exit(0)
		
print('No')

Submission status: Runtime Error

Solution code:

a,b,c = list(map(int, input().split()))
d,e,f = list(map(int, input().split()))	
g,h,k = list(map(int, input().split()))
N = int(input())
l = []
for i in range(N):
	e=int(input())
	l.append(e)
L1 = {a,d,g}
L2 = {a,b,c}
L3 = {a,e,k}
L4 = {c,f,k}
L5 = {g,h,k}
L6=  {c,e,g}
for i in range(N):
	for j in range(N):
		for k in range(N):
			s = set([l[i],l[j],l[k]])
			if (s == L1) or (s == L2) or (s == L3) or (s == L4) or (s == L5) or (s==L6):
				print('Yes')
				exit(0)
		
print('No')

Submission status: Runtime Error

Solution code:
s = int(input())
res = Math.ceil(s/2)

Submission status: Runtime Error

Solution code:
pgnum = input()
res = Math.ceil(pgnum/2)
print(res)

Submission status: Runtime Error

Solution code:
n = input()
paper = 0
if n % 2 == 0:
    paper = n / 2
else:
    paper = n / 2 + 1
print(paper)

Submission status: Runtime Error

Solution code:
n = input()
paper = 0
if n % 2 == 0:
    paper = n / 2
else:
    paper = n / 2 + 1
print(paper)

Submission status: Runtime Error

Solution code:
N = input()
if N % 2 == 1:
    N += 1
print(N/2)

Submission status: Runtime Error

Solution code:
bingo = [list(map(int, input().split())) for _ in range(3)]
N = int(input())

for i in range(N):
    b = int(input())
    for j in range(len(bingo)):
            if b == bingo[j]:
                bingo[j] = 0

true_list = list()
for i in [0, 3, 6]:
    if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:
        true_list.append(0)
for i in [0, 1, 2]:
    if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:
        true_list.append(0)
if (bingo[0] + bingo[4] + bingo[8]) == 0:
    true_list.append(0)
if (bingo[2] + bingo[4] + bingo[6]) == 0:
    true_list.append(0)

if not all(true_list):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
inp = [int(x) for x in input().split()]

bingo = inp[0:9]
b = inp[10:]

for i in b:
    for j in range(len(bingo)):
            if i == bingo[j]:
                bingo[j] = 0

true_list = list()
for i in [0, 3, 6]:
    if (bingo[i] + bingo[i+1] + bingo[i+2]) == 0:
        true_list.append(0)
for i in [0, 1, 2]:
    if (bingo[i] + bingo[i+3] + bingo[i+6]) == 0:
        true_list.append(0)
if (bingo[0] + bingo[4] + bingo[8]) == 0:
    true_list.append(0)
if (bingo[2] + bingo[4] + bingo[6]) == 0:
    true_list.append(0)

if not all(true_list):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

A = A1 + A2 + A3
N = int(input())

index = []
for i in range(N):
    inp = int(input())
    if inp in A:
        index.append(A.index(inp))

if (0 in index and 3 in index and 6 in index) or \
   (1 in index and 4 in index and 7 in index) or \
   (2 in index and 5 in index and 8 in index) or \
   (0 in index and 4 in index and 8 in index) or \
   (2 in index and 4 in index and 6 in index) or \
   (0 in index and 1 in index and 2 in index) or \
   (3 in index and 4 in index and 5 in index) or \
   (6 in index and 7 in index and 8 in index):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

A = A1 + A2 + A3
N = int(input())

index = []
for i in range(N):
    index.append(A.index(int(input())))

if (0 in index and 3 in index and 6 in index) or \
   (1 in index and 4 in index and 7 in index) or \
   (2 in index and 5 in index and 8 in index) or \
   (0 in index and 4 in index and 8 in index) or \
   (2 in index and 4 in index and 6 in index) or \
   (0 in index and 1 in index and 2 in index) or \
   (3 in index and 4 in index and 5 in index) or \
   (6 in index and 7 in index and 8 in index):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

def henkan(l1):
  maped_num = map(str,l1)
  s=''.join(maped_num)
  return s


keta,num = map(int,input().rstrip().split())
l=[]

if num ==0:
  print(num)
  sys.exit()
  
  
for i in range(keta):
  l.append("#")
  

for i in range(num):
    a,b = map(int,input().rstrip().split())
    a=a-1
    if l[a]=="#":
      l[a]=b 
    elif l[a] > b:
      l[a]=b     


      
if l[0] == "#":
  print("-1")
elif l[0] == 0:
  print("-1")
elif l[1]=="#":
  l[1]=0
  x=henkan(l)
  print(x)
elif l[2]=="#":
  l[2]=0
  x=henkan(l)
  print(x)
else:
  x=henkan(l)
  print(x)

Submission status: Runtime Error

Solution code:
A = []
A11,A12,A13 = map(int, input().split())
A21,A22,A23 = map(int, input().split())
A31,A32,A33 = map(int, input().split())
N = int(input())
B = []
for i in range(N):
  B.append(int(input()))
  
A = [[A11,A12,A13],
     [A21,A22,A23],
     [A31,A32,A33]]

sets = []

for i in range(3):
  s = []
  for j in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
for j in range(3):
  s = []
  for i in range(3):
  	s.append(A[i][j])
  sets.append(s)
  
sets.append([A11,A22,A33])
sets.append([A13,A22,A31])

for s in sets:
  count = 0
  for b in B:
    if b in s : 
      count+=1
  if count == 3:
    print("Yes")
    break
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = input()
print(N // 2 + N % 2)

Submission status: Runtime Error

Solution code:
n,m = list(map(int, input().split()))
s = []
c = []
for _ in range(m):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

if n == 1:
    for i in range(10):
        istr = str(i)
        flag = True #このTrueは毎回新しくTrueになる
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            if flag == True:
                print(i)
                break
else: # n!=1
    for i in range(10**(n-1),10**n):
        istr = str(i)
        flag = True
        for j in range(m):
            if not istr[s[j]-1] == str(c[j]):
                flag = False
            else: #あっていた場合何もしない
                pass
        if flag:
            print(i)
            break

Submission status: Runtime Error

Solution code:
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
    index = digit - 1
    if res[index] == 0:
        res[index] = number
    else: #　すでに他の値が入っている場合
        if res[index] >= number: #　新しいnumberの方が小さい場合
            res[index] = number
        else:
            pass

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
    print(res)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])
  
res = [0 for i in range(N)]
for digit, number in zip(s,c):
    digit -= 1
    if not res[digit] == 0:
        if res[digit] <= number:
            res[digit] = numer
        else:
            continue
    res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if convert[0] == 0:
    print(-1)
elif len(str(res)) == N:
    print(res)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
  inputs = list(map(int, input().split()))
  s.append(inputs[0])
  c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
  digit -= 1
  res[digit] = number

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
  print(res)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = n//2
if(n%2==0):
  	print(ans)
elif:
  print(ans+1)

Submission status: Runtime Error

Solution code:
n = int(input)
print((n//2)+(n%2))

Submission status: Runtime Error

Solution code:
a = [list(map(int,input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]
for number in b:
    if b in a:
        a[a.index(b)] = 0
if a[0][0] == a[1][1] == a[2][2] == 0:
    print('Yes')
else:
    for i in range(3):
        if a[i][0] == a[i][1] == a[i][2] == 0:
            print('Yes')
            break
        elif a[0][i] == a[1][i] == a[2][i] == 0:
            print('Yes')
            break
    else:
        print('No')

Submission status: Runtime Error

Solution code:
a = [list(map(int,input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]
for number in b:
    if b in a:
        a[a.index(b)] = 0
if a[0][0] == a[1][1] == a[2][2]:
    print('Yes')
else:
    for i in range(3):
        if a[i][0] == a[i][1] == a[i][2]:
            print('Yes')
            break
        elif a[0][i] == a[1][i] == a[2][i]:
            print('Yes')
            break
    else:
        print('No')

Submission status: Runtime Error

Solution code:
n-int(input())
print((n+1)//2)

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print(N // 2)
else:
    print(N // 2 + 1)

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print(N / 2)
else:
    print(N // 2 + 1)

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print 'N'
else:
    print 'N + 1'

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print([N])
else:
    print([N + 1])

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print(N)
else:
    print(N + 1)

Submission status: Runtime Error

Solution code:
N = int(input())

if N % 2 = 0:
    print(int(N))
else:
    print(int(N + 1))

Submission status: Runtime Error

Solution code:
N = input()
ans = (N + 1) / 2
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
jud = N % 2
if jud == 1:
    ans = N // 2 + 1
else:
    ans == N / 2
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
jud == N % 2
if jud == 1:
    ans = N // 2 + 1
else:
    ans == N / 2
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
ans = (N + 1) // 2
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
ans = N // 2
print(ans)

Submission status: Runtime Error

Solution code:
import itertools as it
dic={}
bing=[[1 for i in range(3)] for j in range(3)]
for i in range(3):
    f=list(map(int,input().split()))
    for each in f:
        dic.update({each:(i,f.index(each))})
n=int(input())
for i in range(n):
    m=int(input())
    if m in dic.keys():
      place=dic[m]
      bing[place[0]][place[1]]=0
flag=False
code="000102101112202122"
code=code+code[::-1]
code=code+"001122021120"

for i in range(8):
    code_sep=code[6*i:6*i+6]
    p=0
    for j in range(3):
        cords=code_sep[2*j:2*j+2]
        p+=bing[int(cords[0])][int(cords[1])]
    if p==0:
        flag=True
        break
    
print("yes")if flag else print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
print(int(n/2)+(n%2))

Submission status: Runtime Error

Solution code:
    N = int(input())
    print(int((N / 2) + 0.9))

Submission status: Runtime Error

Solution code:
N=input()

if N%2==0 :
    print(N/2)
else :
    print(N//2+1)

Submission status: Runtime Error

Solution code:
N = input()
col = N / 2
if col == 0:
  print(col)
else:
  col += 1
  print(col)

Submission status: Runtime Error

Solution code:
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check=False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(1000000)
n,m,k=map(int,input().split())
class UnionFind(object):
    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.size = [1 for i in range(N)]
 
    def merge(self, a, b):
        if self.issame(a,b):
            return
        pa = self.root(a)
        pb = self.root(b)
        self.parent[pa] = pb
        self.size[pb] += self.size[pa]
    
    def root(self, x):
        p = self.parent[x]
        if p == x:
            return x
        else:
            r = self.root(p)
            self.parent[x] = r
            return r
    def issame(self, x, y):
        return self.root(x) == self.root(y)
    def getsize(self, x):
        return self.size[self.root(x)]
uf=UnionFind(n)
ans=[0]*n
for i in range(m):
    a,b=map(int,input().split())
    uf.merge(a-1,b-1)
    ans[a-1]-=1;ans[b-1]-=1
for i in range(k):
    c,d=map(int,input().split())
    if uf.issame(c-1,d-1):
        ans[c-1]-=1;ans[d-1]-=1
for i in range(n):
    ans[i]=uf.getsize(i)+ans[i]-1
print(*ans)

Submission status: Runtime Error

Solution code:
from math import ceil
N = int(inpput())
print(ceil(N/2))

Submission status: Runtime Error

Solution code:
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    break
for i in range(line_b[1]):
  for j in range(line_b[1]):
    if line[i][0]==line[j][0] and line[i][1]!=line[j][1]:
      num[0]=0
if num[0]==0:
  print(-1)
else:
  number=0
  for i in range(line_b[0]):
    number+=num[i]*10**(line_b[0]-1-i)
  print("%d" %number)

Submission status: Runtime Error

Solution code:
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    break
for i in range(line_b[1]):
  for j in range(line_b[1]):
    if line[i][0]==line[j][0] and line[i][1]!=line[j][1]:
      num[0]=0
if num[0]==0 or num[0]<0 or num[1]<0 or num[2]<0 or num[0]>9 or num[1]>9 or num[2]>9:
  print(-1)
else:
  print("%d%d%d" %(num[0],num[1],num[2]))

Submission status: Runtime Error

Solution code:
line_b = list(map(int, input().split(' ')))
line=[]
num=[]
for i in range(line_b[0]):
  num+=[0]
for i in range(line_b[1]):
  line+=[list(map(int, input().split(' ')))]
for i in range(line_b[1]):
  if num[line[i][0]-1]==0:
    num[line[i][0]-1]=line[i][1]
  elif num[line[i][0]-1]!=0 and num[line[i][0]-1]!=line[i][1]:
    num[0]=0
    i=line_b[1]
if num[0]==0 or num[0]<0 or num[1]<0 or num[2]<0:
  print(-1)
else:
  print("%d%d%d" %(num[0],num[1],num[2]))

Submission status: Runtime Error

Solution code:
n=int(input())
if n%2==:
  print(n/2)
else:
  print(int(n/2)+1)

Submission status: Runtime Error

Solution code:
n=int(input())
if n%2==:
  print(n/2)
else:
	print(n//2+1)

Submission status: Runtime Error

Solution code:
n = int(input())
print(Decimal(n / 2))

Submission status: Runtime Error

Solution code:
mod = 10**9+7
 
fact = [1,1]
finv = [1,1]
inv = [0,1]
 
for i in range(2,r2+c2+3):
    fact.append((fact[-1]*i)%mod)
    inv.append((inv[mod%i]*(mod-mod//i))%mod)
    finv.append((finv[-1]*inv[-1])%mod)
 
def nCr(n,r,mod):
      
    return fact[n]*finv[r]*finv[n-r]%mod


import heapq
n,m = map(int,input().split())
l = list(map(lambda x: int(x)*(-1),input().split()))
heapq.heapify(l)
for i in range(m):
    min = heapq.heappop(l)
    heapq.heappush(l,(-1)*(-min//2))
    
print(-sum(l))

def gcd(x, y):
    a, b = x, y
    r = a % b
    while r != 0:
        a, b = b, r
        r = a % b
    return b

def divisors(x):
    D = []
    for i in range(1, int(x**0.5) + 1):
        if x % i == 0:
            D.append(i)
            if i != x**0.5:
                D.append(x // i)
    D.sort()
    return D

def isprime(x):
    t = 1
    for i in range(2, int(x**0.5) + 1):
        if x % i == 0:
            t = 0
            break
    if t == 1 and x != 1:
        return True
    else:
        return False


a, b = map(int, input().split())

CD = divisors(gcd(a, b))



left = 0
if x > 10**9:
    right = 10**9+1
else:
    right = x

while right - left > 1:
    mid = (left + right) //2
    
    if a * mid + b * len(str(mid)) <= x:
        left = mid
    else:
        right = mid
print(left)


import heapq

def dijkstra(graph, node, start):
    dist = [float("inf") for _ in range(node)]
    
    dist[start] = 0
    q = []
    heapq.heappush(q, (0, start))
    
    while q:
        cost, cur_node = heapq.heappop(q)
        
        if dist[cur_node] < cost:
            continue
        
        for nex_cost, nex_node in graph[cur_node]:
            dist_cand = dist[cur_node] + nex_cost
            if dist_cand < dist[nex_node]:
                dist[nex_node] = dist_cand
                heapq.heappush(q, (dist[nex_node], nex_node))

    return dist

def main():
    n, m = map(int, input().split())
    adj = [[] for _ in range(n)]
    for i in range(m):
        a, b, c = map(int, input().split())
        a -= 1
        b -= 1
        adj[a].append((c, b))
        adj[b].append((c, a))
    shortest = []
    for i in range(n):
        shortest.append(dijkstra(adj, n, i))
    ans = 0
    for i in range(n):
        for cost, j in adj[i]:
            if cost > shortest[i][j]:
                ans += 1
    print(ans // 2)
                                                                                                                                                                                                     
if __name__=='__main__':
    main()

def pow_k(x, n,mod):
    """
    O(log n)
    """
    if n == 0:
        return 1

    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
            K %= mod
        x *= x
        x %= mod
        n //= 2

    return K * x % mod

    ans, prodoct, j = 0, 1, 0
    for i in range(N):
        while j < N:
            prodoct *= s[j]
            if K < prodoct:
                j += 1
                break
            ans = max(ans, j - i + 1)
            j += 1
        prodoct //= s[i]
    print(ans)

class Unionfind:
    
    def __init__(self,n):
        self.uf = [-1]*n

    def find(self,x):
        if self.uf[x] < 0:
            return x
        else:
            self.uf[x] = self.find(self.uf[x])
            return self.uf[x]

    def same(self,x,y):
        return self.find(x) == self.find(y)

    def union(self,x,y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return 
        if self.uf[x] > self.uf[y]:
            x,y = y,x
        self.uf[x] += self.uf[y]
        self.uf[y] = x
        

    def size(self,x):
        x = self.find(x)
        return -self.uf[x]

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

if N % 2 == 0:
    print(N / 2)
else:
    print(N // 2 + 1)

Submission status: Runtime Error

Solution code:
a1=[map(int(),input().split())]
a2=[map(int(),input().split())]
a3=[map(int(),input().split())]
n=int(input())
b=[input() for i in range(n)]

line1=[]
line2=[]
line3=[]

for num in b:
    if num in a1:
        line1.append(a1.index(num))
    elif num in a2:
        line2.append(a2.index(num))
    elif num in a3:
        line3.append(a3.index(num))
if 0 in line1 and 0 in line2 and 0 in line3 or 1 in line1 and 1 in line2 and 1 in line3 or 2 in line1 and 2 in line2 and 2 in line3 :
    print("Yes")
elif 0 in line1 and 1 in line2 and 2 in line3 or 2 in line1 and 1 in line2 and 0 in line3:
    print("Yes")
elif 0 in line1 and 1 in line1 and 2 in line1 or 0 in line2 and 1 in line2 and 2 in line2 or 0 in line3 and 1 in line3 and 2 in line3:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
res = a//2
if a%2 >0:
  res += 1
print(res)

Submission status: Runtime Error

Solution code:
a = input()
res = a // 2
if a % 2 > 0:
  res += 1
print(res)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
l=[list(map(int,input().split())) for _ in range(m)]
if n == 1:
  start,end = 0,9
elif n == 2:
  start,end = 10,99
else:
  start,end = 100, 999

for i in range(start, end+1):
  flg = True
  for j in l:
    si = str(i)
    if len(si) < j[0]:
      flg = False
      continue

    if si[j[0]-1] != str(j[1]):
      flg = False
      
  if flg == True:
    print(i)
    break
else:
  print(-1)

Submission status: Runtime Error

Solution code:
N = input()
print(int((N + (N % 2))/2))

Submission status: Runtime Error

Solution code:
N = int(input())
if N % 2 ==0:
  print(N/2)
 
else:
  ptint(1+N/2)

Submission status: Runtime Error

Solution code:
N = int(input())
if N % 2 ==0:
  print(N/2)

else:
  ptint(1+N/2)

Submission status: Runtime Error

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

result = []
for _ in range(n):
  result.append(-1)

for _ in range(m):
  s, c = map(int, input().split())
  if result[s-1] not in [-1, c]:
    print(-1)
    exit()
  elif s == 1 and c == 0:
    print(-1)
    exit()
  else:
    result[s-1] = c

for _ in range(len(result)):
  if result[_] == -1:
    result[_] = 1
  
result = map(str, result)
result = "".join(result)
  
print(result)

Submission status: Runtime Error

Solution code:
N = int(raw_input())
print( N / 2 + (N % 2))

Submission status: Runtime Error

Solution code:
N / 2 + (N % 2)

Submission status: Runtime Error

Solution code:
a11, a12, a13 = map(int, input().split())
a21, a22, a23 = map(int, input().split())
a31, a32, a33 = map(int, input().split())
N = int(input())
num = []
for _ in range(N):
  num.append(int(input()))
  
bingo = [
  [a11, a12, a13], 
  [a21, a22, a23], 
  [a31, a32, a33]
]
 
for n in range(3):
  for m in range(3): 
    if bingo[n][m] in num:
      bingo[n][m] = 0

row1 = bingo[0][0] + bingo[0][1] + bingo[0][2]
row2 = bingo[1][0] + bingo[1][1] + bingo[1][2]
row3 = bingo[2][0] + bingo[2][1] + bingo[2][2]
 
col1 = bingo[0][0] + bingo[1][0] + bingo[2][0]
col2 = bingo[0][1] + bingo[1][1] + bingo[2][1]
col3 = bingo[0][2] + bingo[1][2] + bingo[2][2]
 
cross1 = bingo[0][0] + bingo[1][1] + bingo[2][2]
cross2 = bingo[2][0] + bingo[1][1] + bingo[2][0]
 
if 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a11, a12, a13 = map(int, input().split())
a21, a22, a23 = map(int, input().split())
a31, a32, a33 = map(int, input().split())
N = int(input())
num = []
for _ in range(N):
  num.append(int(input()))
  
bingo = [
  [a11, a12, a13], 
  [a21, a22, a23], 
  [a31, a32, a33]
]

for n in range(3):
  for m in range(3): 
    if bingo[n][m] in num:
      bingo[n][m] = 0

row1 = bingo[0][0] + bingo[0][1] + bingo[0][2]
row2 = bingo[1][0] + bingo[1][1] + bingo[1][2]
row3 = bingo[2][0] + bingo[2][1] + bingo[2][2]

col1 = bingo[0][0] + bingo[1][0] + bingo[2][0]
col2 = bingo[0][1] + bingo[1][1] + bingo[2][1]
col3 = bingo[0][2] + bingo[1][2] + bingo[2][2]

cross1 = bingo[0][0] + bingo[1][1] + bingo[2][2]
cross2 = bingo[2][0] + bingo[1][1] + bingo[2][0]

if 0 in [row1, row2, row3, col1, col2, col3, cross1, cross2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = str(input())

if a % 2 == 0:
  print(a % 2)
else:
  print((a+1) % 2)

Submission status: Runtime Error

Solution code:
import sys
n, m = map(int, input().split())
num = [-1 for i in range(n)]
for i in range(m):
    s, c = map(int, input().split())
    s -= 1
    if num[s] != -1 and c != num[s]:
        print(-1)
        sys.exit()
    num[s] = c
if  n == 1:
    print(0)
elif num[0] == 0:
    print(-1)
else:
    num[0] = max(num[0], 1)
    for i in range(1, n):
        num[i] = max(num[i], 0)
    print(''.join([str(i) for i in num]))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
import numpy as np

A = np.array([list((int(_) for _ in input().split())) for x in range(3)])
N = int(input())
b = {int(input()) for _ in range(N)}

ans = "No"
for i in range(3):
    if (set(A[i, :]) <= b) or (set(A[:, i]) <= b):
        ans = "Yes"
if ({A[0][0], A[1][1], A[2][2]} <= b) or ({A[0][2], A[1][1], A[2][0]} <= b):
    ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:
N = int(raw_input())

print(N // 2 + N % 2)

Submission status: Runtime Error

Solution code:
card = []       #リスト型の変数カードを定義する。
for i in range(3):      #変数カードに三列のリスト型の数字を三行文加える。
    card.append(list(map(int,input().split())))

N = int(input())        #呼ばれる数字の数を指定する。

result = [[0,0,0],[0,0,0],[0,0,0]]      #変数resultを定義する。
for _ in range(N):      #以下の動作をN回繰り返す。
    b = int(input())        #数字を読み上げる。
    for i in range(3):      #bがAijと対応していた場合、変数resultのAijと同じ位置に1を代入する。
        for j in range(3):
            if b == card[i][j]:
                result[i][j] = 1

judge = "No"        #以下の条件に当てはまらなければNoと表示する

for i in range(3):      #横のビンゴの確認
    if result[i][0] * result[i][1] * result[i][2] == 1:
        judge = "Yes"

for i in range(3):      #縦のビンゴの確認
    if result[0][i] * result[1][i]*result[2][i] == 1:
        judge = "Yes"

if result[0][0] * result[1][1] * result[2][2] == 1:     #斜めのビンゴの確認
    judge = "Yes"

if result[0][2] * result[1][1] * result[2][0] == 1:     #斜めのビンゴの確認
    judge = "Yes"

print(judge)

Submission status: Runtime Error

Solution code:
card = []       #リスト型の変数カードを定義する。
for i in range(3):      #変数カードに三列のリスト型の数字を三行文加える。
    card.append(list(map(int,input().split())))

N = int(input())        #呼ばれる数字の数を指定する。

result = [[0,0,0],[0,0,0],[0,0,0]]      #変数resultを定義する。
for _ in range(N):      #以下の動作をN回繰り返す。
    b = int(input())        #数字を読み上げる。
    for i in range(3):      #bがAijと対応していた場合、変数resultのAijと同じ位置に1を代入する。
        for j in range(3):
            if b == card[i][j]:
                result[i][j] = 1

judge = "No"        #以下の条件に当てはまらなければNoと表示する

for i in range(3):      #横のビンゴの確認
    if result[i][0] * result[i][1] * result[i][2] == 1:
        judge = "Yes"

for i in range(3):      #縦のビンゴの確認
    if result[0][i] * result[1][i]*result[2][i] == 1:
        judge = "Yes"

if result[0][0] * result[1][1] * result[2][2] == 1:     #斜めのビンゴの確認
    judge = "Yes"

if result[0][2] * result[1][1] * result[2][1] == 1:     #斜めのビンゴの確認
    judge = "Yes"

print(judge)

Submission status: Runtime Error

Solution code:
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(n//2+n%2)

Submission status: Runtime Error

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    college: jalpaiguri Govt Enggineering College
    Date:06/03/2020
'''
from math import ceil,sqrt,gcd,log,floor
from collections import deque
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())
def msi(): return map(str,input().strip().split(" "))
def lsi(): return list(msi())
#for _ in range(ii()):
n=ii()
print(ceil(n/2))

Submission status: Runtime Error

Solution code:
N=int(input())
ans=ceil(N/2)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
print(n//2)

if n % 2 = 0:
    print(n/2)
else:
    print(n/2+1)

Submission status: Runtime Error

Solution code:
n=int(input()
print(n//2)

if n % 2 = 0:
    print(n/2)
else:
    print(n/2+1)

Submission status: Runtime Error

Solution code:
n=int(input())
if n%2:
  print(int(n/2)+1)
else:
  print(int(n/2)

Submission status: Runtime Error

Solution code:
N = input()

if N%2 ==0:
  ans = N%2
  print(ans)
  
else :
  ans = N%2 + 0.5
  print(int(ans))

Submission status: Runtime Error

Solution code:
-*- coding: utf-8 -*-
  
n = input()

if n%2 == 0:
  print(n/2)
else:
  print((n+1)/2)

Submission status: Runtime Error

Solution code:
n = input()

if n%2 == 0:
  print(n/2)
else:
  print((n+1)/2)

Submission status: Runtime Error

Solution code:
N = input()

if N%2 == 0:
  print(N/2)
else:
  print((N+1)/2)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0

if(N%2 == 0):
  ans = N/2
else:
  ans = math.floor(N/2) + 1
  
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
if(N%2 == 0):
  ans = n/2
else:
  ans = n/2 + 1
print(ans)

Submission status: Runtime Error

Solution code:
N = imput("Please enter numbr: ")
imp_num = (N / 2)

if 1 <= imp_num <= 100:
  Print(round(imp_num))
else:
  Print("Please recheck")

Submission status: Runtime Error

Solution code:
N = imput(please enter your number: )
print(round(N / 2))

Submission status: Runtime Error

Solution code:
n = int(input())
if n % 2 == 0:
    print(n//2)
else:
    print(n//2)+1

Submission status: Runtime Error

Solution code:
my_num = N
print(rounud(my_num / 2))

Submission status: Runtime Error

Solution code:
N = 5
note = N / 2
Print(round(note))

Submission status: Runtime Error

Solution code:
N = 5
Print(round((N/2))

N = 2
Print(round((N/2))

N = 100
Print(round((N/2))

Submission status: Runtime Error

Solution code:
N = imput()
print(round(N/2))

Submission status: Runtime Error

Solution code:
from math import *

N = impt()
Cul = N / 2

print(round(Cul))