Problem:


Score : 100 points

Problem Statement

Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.

In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock".

The current time is A o'clock, and a contest will begin in exactly B hours.
When will the contest begin? Answer in 24-hour time.

Constraints

0 \leq A,B \leq 23

A and B are integers.

Input

The input is given from Standard Input in the following format:

A B

Output

Print the hour of the starting time of the contest in 24-hour time.

Sample Input 1

9 12

Sample Output 1

21

In this input, the current time is 9 o'clock, and 12 hours later it will be 21 o'clock in 24-hour time.

Sample Input 2

19 0

Sample Output 2

19

The contest has just started.

Sample Input 3

23 2

Sample Output 3

1

The contest will begin at 1 o'clock the next day.



Sample input:
9 12


Sample output:
21

Submission status: Accepted

Solution code:
c, d = map(int, input().split())
print((c + d)%24)

Submission status: Accepted

Solution code:
a = input()
b = a.split()
r = int(b[0]) + int(b[1])
if r >= 24:
    r = r-24
print(r)

Submission status: Accepted

Solution code:
def solve():
  ar = raw_input().split(' ')
  A = int(ar[0])
  B = int(ar[1])
  return (A + B) % 24

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

Submission status: Accepted

Solution code:
def solve():
    a, b = map(int, input().split())
    if a + b >= 24:
        print(a + b - 24)
    else:
        print(a + b)

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
A,B = [int(x) for x in input().split(" ")]

print((A + B) % 24)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if 0 <= a <= 23 :
   print((a+b) % 24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
tmp_n = n.split(" ")

a = tmp_n[0]
b = tmp_n[1]

t = int(a)+int(b)

print(int(t%24))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=a+b
if s-24>=0:
    print(s-24)
else:
    print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n,m=list(map(int, input().split()))
print((n+m)%24)

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
print (A+B) % 24

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a + b <= 23:
    print(a+b)
else:
    print((a+b)-24)

Submission status: Accepted

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


print((a+b)%24)

Submission status: Accepted

Solution code:
A,B=map(int, input().split())
C=A+B
if C>=24:
    C=C-24
print(C)

Submission status: Accepted

Solution code:
a = map(int,raw_input().split())
#a = int(raw_input())

print (a[0]+a[1])%24

Submission status: Accepted

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

print((a+b) % 24 )

Submission status: Accepted

Solution code:
import sys

a, b = sys.stdin.readline().split()
print (int(a) + int(b)) % 24

Submission status: Accepted

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

if(a[0] + a[1] >= 24 ):
  print(a[0] + a[1] - 24)
else:
  print(a[0] + a[1])

Submission status: Accepted

Solution code:

a, b = map(int, input().split(" "));
print( (a+b) % 24);

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print(int((a[0] + a[1]) % 24))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = (a + b) % 24
print(c)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
x = (A + B) % 24
print(x)

Submission status: Accepted

Solution code:
A = list(map(int,input().split(" ")))
print(sum(A)%24)

Submission status: Accepted

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
if a+b>=24:
    c = int(a+b-24)
    print(c)
else :
    d = int(a+b)
    print(d)

Submission status: Accepted

Solution code:
a,b = input().split()
a=int(a)
b=int(b)
if a+b<24:
    print(a+b)
else:
    print(a+b-24)

Submission status: Accepted

Solution code:
tmp = input().split()
a, b = int(tmp[0]), int(tmp[1])

s = a + b

if s < 24:
    print(s)
else:
    print(s-24)

Submission status: Accepted

Solution code:
tmp = input().split()
a, b = int(tmp[0]), int(tmp[1])
print((a+b) % 24)

Submission status: Accepted

Solution code:
a,b = input().split()
a,b = int(a),int(b)
c = a + b
if c >= 24:
    c = c - 24
print(c)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))

T = (A + B) % 24
print(T)

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
print (A + B) % 24

Submission status: Accepted

Solution code:
import sys
import numpy as np
import string

A, B = (int(i) for i in input().split(" "))

start = (A + B) % 24

print(start)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print((A + B) % 24)

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

for line in sys.stdin.readlines():
    a = line.strip().split(" ")
    a1 = int(a[0])
    a2 = int(a[1])
    print((a1+a2) % 24)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
c = a + b
if c<24:
  print(c)
else:
  print(c-24)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
c = a[0] + a[1] 
if c < 24:
 print(c)
else:
 c -= 24
 print(c)

Submission status: Accepted

Solution code:
timeline = list(map(int, input().split()))

ans = (timeline[0] + timeline[1]) % 24
print(ans)

Submission status: Accepted

Solution code:
l = input().split()
A = l[0]
B = l[1]
C = int(A) + int(B)
time = C % 24

print(time)

Submission status: Accepted

Solution code:
#coding:utf-8

AB = raw_input().split()
A = int(AB[0])
B = int(AB[1])

if A+B > 24:
    print (A+B)%24
elif A+B == 24:
    print 0
else:
    print A+B

Submission status: Accepted

Solution code:
A,B=list(map(int,input().split()))
print((A+B)%24)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
print((A+B) % 24)

Submission status: Accepted

Solution code:
time = input()
ans = time.split()
print((int(ans[0]) + int(ans[1])) % 24)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(int, input().split())
print((a+b) % 24)

Submission status: Accepted

Solution code:
A,B = (int(i) for i in input().split())
print((A+B)%24)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
res = a+b
if res>=24:
    print(res-24)
else:
    print(res)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B = map(int, raw_input().split())


print((A+B)%24)

Submission status: Accepted

Solution code:
time = input().rstrip().split(" ")
ans = int(time[0]) + int(time[1])
if ans >= 24:
    print( ans - 24 )
else:
    print( ans )

Submission status: Accepted

Solution code:
a,b = map(int, raw_input().split())
print (a+b)%24

Submission status: Accepted

Solution code:
A1,A2=map(int,input().split())
B=A1+A2
if B>=24:
    B-=24
print (B)

Submission status: Accepted

Solution code:
a, b=map(int, input().split())
c=a+b
if c<24:
  print (c)
elif c>=24:
  print (c-24)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

A, B = map(int, raw_input().split())
print (A + B) % 24

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline()
lst = line.split()
a = int(lst[0])
b = int(lst[1])

print ((a + b) % 24)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Apr  5 11:19:44 2017

@author: syaga
"""

if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    total = A + B
    if total > 23:
        print(total-24)
    else:
        print(total)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

c = (a + b) % 24
print(c)

Submission status: Accepted

Solution code:
a,b = map(int,raw_input().split())
print (a+b)%24

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split(" "))
print (A + B) % 24

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
sum = 0
sum = (a + b)
if (sum >= 24) :
    sum -= 24
print("%d" % sum)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

c = (a + b) % 24

print(c)

Submission status: Accepted

Solution code:
a, b = input().split()
a = int(a)
b = int(b)

res = a + b
if res >= 24:
    res = res - 24
print(res)

Submission status: Accepted

Solution code:
[A, B] = map(int, raw_input().split())
print (A+B) % 24

Submission status: Accepted

Solution code:
#coding:utf-8

a, b = list(map(int, input().rstrip().split()))
t = a + b
if t >= 24:
  t = t - 24
print(t)

Submission status: Accepted

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

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

output = (A + B)%24

print(output)

Submission status: Accepted

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

A, B= map(int,raw_input().split())

ans = A + B

if ans > 23:
    ans -= 24
    
print(ans)

Submission status: Accepted

Solution code:
L = [int(i) for i in input().split(' ')]
print((L[0] + L[1]) % 24)

Submission status: Accepted

Solution code:
data = list(map(int,input().split(" ")))
x = sum(data)
if x >= 24:
	print(x%24)
else:
    print(x)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
A, B = map(int, input().split())
if A+B > 24:
    print(A+B-24)
elif A+B == 24:
    print(0)
else:
    print(A+B)

Submission status: Accepted

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

import sys
import os

a, b = list(map(int, input().split()))
c = (a + b) % 24
print(c)

Submission status: Accepted

Solution code:
input_str = input()
input = input_str.split(' ')
output = (int(input[0]) +int(input[1]))%24
print(output)

Submission status: Accepted

Solution code:
input_str = input()
input = input_str.split(' ')
output = int(input[0]) +int(input[1])
if output > 23:
    output -= 24
print(output)

Submission status: Accepted

Solution code:
a,b=map(int,raw_input().split())
c=(a+b)%24
print c

Submission status: Accepted

Solution code:
import sys
a = sys.stdin.readline()
a,b = a.strip().split(" ")
print((int(a)+int(b))%24)

Submission status: Accepted

Solution code:
l = input().split()
A = int(l[0])
B = int(l[1])

T = int(A + B)
if T < 24:
	print(T)
else:
	print(T - 24)

Submission status: Accepted

Solution code:
import numpy as np

a,b = map(int, raw_input().split())
if a+b < 24:
    print a+b
else: print a+b-24

Submission status: Accepted

Solution code:
def main():
    A, B = tuple(map(int, input().split(' ')))
    print('{}'.format((A+B)%24))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    A = times[0]
    B = times[1]
    print((A+B)%24)

Submission status: Accepted

Solution code:
A,B = (map(int, input().split()))
print ((A + B) % 24)

Submission status: Accepted

Solution code:
A,B = (map(int, input().split()))
print (A + B if A + B < 24 else A + B - 24)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    h1 = input()
    a, b = h1.split()
    print((int(a) + int(b)) % 24)

Submission status: Accepted

Solution code:
List=input().split(" ")
a=int(List[0])
b=int(List[1])
c=a+b
if c>=24:
    print(str(c-24))
else:
    print(str(c))

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split(" ")]
res = a+b if a+b<24 else a+b-24
print(res)

Submission status: Accepted

Solution code:
import sys

a, b = map(int, raw_input().split())
print (a + b) % 24

Submission status: Accepted

Solution code:
lst = input().split(" ")
A =int(lst[0])
B =int(lst[1])
print((A+B)%24)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
t = a+b

if t < 24:
    print(t)
else :
    print(t - 24)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % ((A+B)%24))

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print (a+b) % 24

Submission status: Accepted

Solution code:
time = list(map(int, input().split()))

print((time[0] + time[1]) % 24)

Submission status: Accepted

Solution code:
print(sum(map(int,raw_input().split()))%24)

Submission status: Accepted

Solution code:
x,y = map(int, input().split(' '))
print((x+y)%24)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
print((a + b) % 24)

Submission status: Accepted

Solution code:
A, B = [int(v) for v in input().split()]
print ((A + B) % 24)

Submission status: Accepted

Solution code:
# coding: utf-8
num_A, num_B = map(int, input().split())
if num_A + num_B >= 24:
    print(num_A + num_B - 24)
else:
    print(num_A + num_B)

Submission status: Accepted

Solution code:
# coding: utf-8

a,b = map(int,raw_input().split())
ans = a+b
if ans > 23:
	print ans-24
else:
	print ans

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
print((A+B)%24)

Submission status: Accepted

Solution code:
inpt = map(int, raw_input().split())

print (inpt[0] + inpt[1]) % 24

Submission status: Accepted

Solution code:
str = input().split(' ')
a = int(str[0])
b = int(str[1])

s = a + b
res = s
if s >= 24:
  res = s - 24

print(res)

Submission status: Accepted

Solution code:
#ABC057A

a,b=map(int,raw_input().split())
print (a+b)%24

Submission status: Accepted

Solution code:
input_lines = raw_input()
A=int(input_lines.split()[0])
B=int(input_lines.split()[1])
print (A+B)%24

Submission status: Accepted

Solution code:
AB = input()
if len(AB) <= 2:
    ABL = [AB]
else:
    ABL= AB.replace("\n", " ").split(" ")



A = int(ABL[0])
if len(AB) <= 2:
    C = A
else:
    B = ABL[1]
    C = int(A) + int(B )
    
if C >= 24:
    C -= 24
print(C)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

c = a+b
if c > 23:
    c -= 24
print(c)

Submission status: Accepted

Solution code:
import sys

def solve():
    A, B = map(int, input().split())
    ans = (A + B) % 24
    print(ans)

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print((a + b) % 24)

Submission status: Accepted

Solution code:
# coding: utf-8

a = input().split()
b = int(a[0]) + int(a[1])

if b >= 24:
    b = b -24

print(b)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
print((A + B) % 24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
Start = (A+B)%24
print(Start)

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
print((N+K)%24)

Submission status: Accepted

Solution code:
print sum(map(int, raw_input().split()))%24

Submission status: Accepted

Solution code:
A,B = map(int, raw_input().split())

print (A+B)%24

Submission status: Accepted

Solution code:
ab=(input())
a_,b_=ab.split()
a=int(a_)
b=int(b_)

if a+b>24:
    print(a+b-24)
elif a+b==24:
    print("0")
        
else:
    print(a+b)

Submission status: Accepted

Solution code:
import sys

INF = 10**9+7

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def ns(): return stdin.readline().strip()
def nsl(): return list(stdin.readline().strip())
def ni(): return int(stdin.readline())
def nil(): return list(map(int, stdin.readline().split()))

a, b = nil()

print((a+b)%24)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    print((A + B) % 24)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split(" "))

print((a + b) % 24)

Submission status: Accepted

Solution code:
c, a = map(int, input().split())
print((c + a) % 24)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = a + b
if c < 24:
    print(c)
else:
    print(c - 24)

Submission status: Accepted

Solution code:
a,b=raw_input().split(' ')
a=int(a)
b=int(b)

print (a+b)%24

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a + b >= 24:
    answer = a + b - 24
else:
    answer = a + b

print(answer)

Submission status: Accepted

Solution code:
import sys, array, re, functools
input = lambda: sys.stdin.readline()
@functools.lru_cache(maxsize = 10000)

def Main():
  a, b = map(int, input().split())
  ans  = a + b
  if( ans < 24):
    print(ans)
  elif ans  == 24:
    print(0)
  else:
    print(ans - 24)
  
if __name__ == '__main__':
  Main()

Submission status: Accepted

Solution code:
l = map(int, raw_input().split())

time=(l[0]+l[1])%24

print time

Submission status: Accepted

Solution code:
import sys, array, math, re, functools
A,B = [int(i) for i in input().split()]
OUT = (A + B) % 24
print(OUT)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split()
c = int(a[0])
d = int(a[1])
e = c + d 
if e == 24:
    e = 0
if e > 24:
    e -= 24
print(e)

Submission status: Accepted

Solution code:
A,B=map(int,raw_input().split())
print (A+B)%24

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())

result = A + B

while True:
    if 24 <= result:
        result -= 24
    else:
        break

print(result)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())

    t = A + B
    if t >= 24:
        t -= 24
    print(str(t))

main()

Submission status: Accepted

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


def main():
    a, b = [int(e) for e in input().split()]
    answer = (a + b) % 24
    return answer


print(main())

Submission status: Accepted

Solution code:
A, B = map(int, input().split()) 
print ((A+B)%24)

Submission status: Accepted

Solution code:
times = input().split()
a = int(times[0])
b = int(times[1])
if a + b >= 24:
    print(a + b - 24 )
else:
    print(a + b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, S = list(map(int, input().split()))
s = N + S
if s >= 24:
    s = s - 24
print(str(s))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# get two integers separated with half-width break
a, b = map(int, raw_input().split())
# get a string

o = (a + b) % 24


# output
print o

Submission status: Accepted

Solution code:
import sys

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func()
    top_str = input_raw.strip().split()
    [A, B] = [int(top_str[0]), int(top_str[1])]
    T = (A + B) % 24
    print T

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        a, b = map(lambda x: int(x), line.split(" ", 2))
        print (a + b) % 24

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a, b = map(int, input().split())
    diff = (a + b) % 24
    print(diff)

Submission status: Accepted

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

hour = (A + B) % 24

print(hour)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
C = (A + B) % 24
print(C)

Submission status: Accepted

Solution code:
b = input()
[c,d] =b.split()
print((int(c)+int(d))%24)

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print (a + b) % 24

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a,b = map(int,stdin.readline().split())
print (a+b)%24

Submission status: Accepted

Solution code:
a,b = input().split(" ")
a = int(a)
b = int(b)
print((a + b) % 24)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))

ans = (A + B) % 24

print(ans)

Submission status: Accepted

Solution code:
def remtime(inStr):
	[now, diff] = inStr.split()
	print((int(now) + int(diff)) % 24)

remtime(input())

Submission status: Accepted

Solution code:
a,b=map(int,input().split())

ans = (a+b)%24

print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a,b = map(int, input().split())
    print ((a + b) % 24)

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
print (A+B)%24

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = [int(n) for n in input().split()]
print((A+B)%24)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
a,b = map(int,input().split())

c = (a+b)%24
print(c)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
A += B
A %= 24
print(A)

Submission status: Accepted

Solution code:
ab = list(map(int, input().split()))

A = ab[0]
B = ab[1]

C = A+B
if C >= 24:
    C -= 24

print(C)

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]
if a+b>=24:
    print(a+b-24)
else : print(a+b)

Submission status: Accepted

Solution code:
a,b=map(int,raw_input().split())
print (a+b)%24

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
c = (a+b)%24
print(c)

Submission status: Accepted

Solution code:
[a, b] = map(int,  input().split())
print((a + b) % 24)

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))

A+=B
if A>=24:
	A-=24

print(A)

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())

print (A + B) % 24

Submission status: Accepted

Solution code:
a,b = map(int,input().split(' '))
print((a+b)%24)

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))

ans = (A + B) % 24
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())

print (a+b)%24

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print (a + b) % 24

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
print (a+b)%24

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    a,b = LI()

    return (a+b)%24



print(main())

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin


def na(): return map(int, stdin.readline().split())


def ns(): return stdin.readline().strip()


a,b = na()
print((a+b)%24)

Submission status: Runtime Error

Solution code:
import math
n = int(input())
s = math.ceil(math.sqrt(n))
h = 10**5
for i in range(1,s+1):
  if n%i==0:
    if h > max(len(str(i)),len(str(int(n/i)))):
      h = max(len(str(i)),len(str(int(n/i))))
print(h)

Submission status: Runtime Error

Solution code:
print((int(input())+int(input()))%24)

Submission status: Runtime Error

Solution code:
print(((read)+(read))%24)

Submission status: Runtime Error

Solution code:
num = int(input())

def function(a,b):
    return (max(len(str(a)),len(str(b))))

d = len(str(num))

for i in range(1,num+1):
    if num % i == 0:
        b = int(num // i)
        c = function(i,b)
        if d >= c:
            d = c
        else:
            print(d)
            exit()
print(d)

Submission status: Runtime Error

Solution code:
a,b=int(input().split())
print((a+b)%24)

Submission status: Runtime Error

Solution code:
n = int(input())
tmp = n
ans = n
y = tmp **0.5
o = int(y // 1)
for i in range(o+1):
    a=i+1
    #print("a:"+str(a))
    b=n/(i+1)
    #print("b:"+str(b))
    #print("a*b:"+str(a*b))
    if (b.is_integer()==True ):
        kari = max(len(str(a)),len(str(int(b))))
        #print("kari:"+str(kari))
        ans = min(ans,kari)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,iput().split())
 
if A+B>=24:
  print(A+B-24)
else:
  print(A+B)

Submission status: Runtime Error

Solution code:
A,B=map(int,iput().splilt())

if A+B>=24:
  print(A+B-24)
else:
  print(A+B)

Submission status: Runtime Error

Solution code:
a,b = map(int, raw_input())
print (a + b) % 24

Submission status: Runtime Error

Solution code:
import bisect

N=int(input())
A = sorted(list(map(int,input().split())))
B = sorted(list(map(int,input().split())))
C = sorted(list(map(int,input().split())))

count=0
for i in range(N):
    a_cand = bisect.bisect_right(A,B[i]-1)
    c_cand = N-bisect.bisect_right(C,B[i])
    count += a_cand*c_cand
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

fab = 0

ans = 1000

n_s = int(n ** (1/2))

for i in range(1, n_s + 2):
    if n % i == 0:
        a = len(str(i))
        b = len(str(int(n / i)))
        #print(n/i, i, a, b)
        if a > b and a < ans:
            ans = a
        elif a < b and b < ans:
            ans = b


print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().splilt())
print((a + b) % 24)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split)

print((a+b)%24)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(max(a+b,a+b-24)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
return A+B % 24

Submission status: Runtime Error

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

print((a+b)%24)

Submission status: Runtime Error

Solution code:
A, B = map(int, input())
print((A+B) % 24)

Submission status: Runtime Error

Solution code:
N = int(input())

ans = 10**18

for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        b = N//i
        ans = min(ans, max( len(str(i)),  len(str(b))))
print(ans)

Submission status: Runtime Error

Solution code:
import itertools
A, B = map(int,input().split())

print(itertools.cycle(range(24))[A+B])

Submission status: Runtime Error

Solution code:
x=sum(list(map(int,input.split())))
if x>=24:
  x-=24
print(x)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
s,c = [],[]
for i in range(n):
    a = list(map(int,input().split()))
    s.append(a)
for i in range(m):
    a = list(map(int,input().split()))
    c.append(a)


for i in range(n):
    tmp = 10**16
    ans = 0
    for j in range(m):
        b = (abs(s[i][0]-c[j][0])+abs(s[i][1]-c[j][1]))
        if tmp > b:
            tmp = b
            ans = j+1
    print(ans)

Submission status: Runtime Error

Solution code:
import sys
import math

# python3にlongの概念はない
N = int(input())
M = int(math.sqrt(N))
# N**0.5でも可能
number = 1
ans = 1

for i in range(1, M+1):
    if N % i == 0:
        number = i

number = math.floor(N/number)
ans = len(str(number))

print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
print (a+b) if a+b >= 24 print (a+b-24)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
ans = float("inf")
a = 1
b = 1
for i in range(1, math.floor(N**0.5)):
    a = i
    b = N/i
    if N%i==0:
        ans = min(ans, max(len(str(a)),len(str(int(b)))))
print(ans)

Submission status: Runtime Error

Solution code:
A, B = input(int, input().split())

print((A + B) % 24)

Submission status: Runtime Error

Solution code:
A,B = [for(i) for i in input().split()]
if A + B > 24:
  print(A + B -24)
else:
  print(A+B)

Submission status: Runtime Error

Solution code:
N=int(input())

count=0
lis=[]


for i in range(1,N+1):
	if N/i < i:
		break
	if N/i==N//i:
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print(min(llis))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

ans1 = A + B


if ans1 >= 24:
    ans2 = ans1 - 24
    print(ans2)
else:
    print(ans1)

Submission status: Runtime Error

Solution code:
time_input = input()
time = time_input.split()

A = time[0]
B = time[1]

if A + B > 24:
    print(A + B - 24)
elif A + B == 24:
    print(0)
else:
    print(A + B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun May 31 17:19:32 2020

@author: NEC-PCuser
"""

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
                arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def multiplication(n):
    ans = len(str(n))
    for i in range(2, int(-(-n**0.5//1))+1):
        if (n % i == 0):
            ans = max([len(str(i)), len(str(n // i))])
    return ans
        

if __name__ == "__main__":
    N = int(input())
    """
    l = factorization(N)
    """
    print(multiplication(N))
    """
    minimu = 10 ** 10
    ans = 0
    for i in range(0, 2**len(l)):
        a = 1
        b = 1
        for j in range(0, len(l)):
            if ((i >> j) & 1):
                a *= l[j]
            else:
                b *= l[j]
        if (abs(a - b) < minimu):
            minimu = abs(a - b)
            ans = max([len(str(a)), len(str(b))])
    print(ans)
    """

Submission status: Runtime Error

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

idou = []
for a, b in student:
  idousaki = -1
  nearest = 1000000000
  for i, x, y in enumerate(cp):
    d = abs(x-a) + abs(y-b)
    if d < nearest:
      nearest = d
      idousaki = i+1
      
  idou.append(idousaki)
  
for i in idou:
  print(i)

Submission status: Runtime Error

Solution code:
n = int(input())
i = 1
divisor = (1 + n) // 2
min_value = 10 ** 10 + 1
while i < divisor:
    if n % i == 0:
        divisor = min(n // i, divisor)
        if max(len(str(i)),len(str(n // i))) > min_value:
            break
        min_value = min(min_value,max(len(str(i)),len(str(n // i))))
    i += 1
print(min_value)

Submission status: Runtime Error

Solution code:
a, b =map(in, input().split())
print((a+b)%24)

Submission status: Runtime Error

Solution code:
A, B = map(int,input(.split()))
print((A+B)%24)

Submission status: Runtime Error

Solution code:
a,b = map(int input().split())
if a+b >= 24:
  print(a+b-24)
else:
  print(a+b)

Submission status: Runtime Error

Solution code:
import sys
import math
import bisect

def main():
    a, b = map(int, input().split())
    ans = a + b
    while (ans > 24)
        ans -= 24
    print(ans)

if __name__ == "__main__":
    main()