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:
#!/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
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
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
inf = float('INF')

#A
def A():
    a, b = LI()
    print((a+b)%24)
    return

#B
def B():
    return

#C
def C():
    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__':
    A()

Submission status: Accepted

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

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

# solve & output
print((A + B) % 24)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC57 A

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

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:
a, b = map(int, input().split())
if a + b < 24:
  print(a + b)
else:
  print(a + b - 24)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = (A + B) % 24
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

start = a + b

if start > 23:
  start -= 24

print(start)

Submission status: Accepted

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

if b >= 24:
  print(b-24)
else:
  print(b)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if (A+B)>23:
  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:
# A問題
A, B = map(int, input().split())
if A+B > 23:
    print(A+B-24)
else:
    print(A+B)

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()
print((A + B) % 24)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#print(A,B)
C=A+B
if C <= 23:
  print(C)
elif C >=24:
  print(C-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=map(int,input().split())
if a+b>23:
 print(a+b-24)
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:
# coding: utf-8
# Your code here!

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

# print(A)

# print(B)

print((A + B) % 24)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


abc()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b = 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())
if a + b < 24:
    print(a + b)
else:
    print(a + b - 24)

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 a+b<24:
    print(a+b)
else:
    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())
ans = a+b

if a+b >=24 :
    ans -= 24

print(ans)

Submission status: Accepted

Solution code:
a, b = [ int(v) for v in 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:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###

A, B = mi()

print(A+B if A+B<=23 else A+B-24)

Submission status: Accepted

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

ans = 0
if A + B < 24 :
    ans = A + B
elif A + B >= 24 :
    ans = (A + B) - 24

print(ans)

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 = map(int,input().split(' '))
if A + B <= 23:
  print(A + B)
else:
  print(A + B -24)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 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 II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    A, B = LI()
    ans = (A + B) % 24
    return ans

print(main())

Submission status: Accepted

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

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:
# 入力
# スペース区切りの整数の入力(定数)
a, b = map(int, input().split())

# 計算と出力
print(int((a+b)%24))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/05/19
# AtCoder Beginner Contest 057 - A

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

# Calc
if a + b > 23:
  ans = a + b - 24
else:
  ans = a + b

# Output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

answer=a+b

if answer>=24:
	answer=answer-24

print(answer)

Submission status: Accepted

Solution code:
print(int(eval(input().replace(' ','+')))%24)

Submission status: Accepted

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

ans = A + B if (A+B) < 24 else A + B - 24
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if ans < 24:
    print(ans)
else:
    print(ans - 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())

s = a + b
if s < 24:
    print(s)
else:
    print(s - 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(" "))
print((A+B)%24)

Submission status: Accepted

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

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())
a += b
if a>=24:
    print(a-24)
else:
    print(a)

Submission status: Accepted

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

Submission status: Accepted

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

if a+b < 24:
    print(a+b)
else:
    print(a+b-24)

Submission status: Accepted

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

m=a+b

if m>=24:
  print(int(m-24))
else:
  print(int(m))

Submission status: Accepted

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

Submission status: Accepted

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

if h >= 24:
    print(h - 24)
else:
    print(h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def read_input():
    a, b = map(int, input().split())
    return a, b


def submit():
    a, b = read_input()

    c = a + b
    print(c % 24)

if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
ans = (a+b)%24
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:
a, b = map (int, input().split())
print((a + b) % 24)

Submission status: Accepted

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

if(a + b >= 24):
    print((a + b) % 24)
else:
    print(a + b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
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 if a+b < 24 else (a+b)-24)

Submission status: Accepted

Solution code:
A,B = [int(i) for i in input().split()]
if 0 <= A <= 23 and 0 <= B <= 23:
    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, A + B] [A + B < 24])

Submission status: Accepted

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

Submission status: Accepted

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

ans = (A+B) % 24

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
now = A + B
if now < 24:
    print(now)
else:
    print(now - 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())
print(a+b if a+b <24 else a+b-24)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

x,y = map(int,input().split())

print((x+y)%24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC057A - Remaining Time
a, b = list(map(int, input().rstrip().split()))
print((a + b) % 24)

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


a, b = inl()
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())

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

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a, b = f()
    print((a+b)%24)

solve()

Submission status: Accepted

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

t = 0
if a + b == 24:
  t = 0
elif a + b < 24:
  t = a + b
else:
  t = a + b - 24

print(t)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a + b < 24:
  print(a+b)
else:
  print(a+b-24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    # 1e10

    # 初期値用:十分小さい数(-100億)
    # -1e10
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a, b = (int(_) for _ in input().split())  
    print((a+b)%24)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    A, B = map(int, input().split())

    return (A + B) % 24


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

Submission status: Accepted

Solution code:
print(eval('('+input().replace(' ','+')+')%24'))

Submission status: Accepted

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

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

c = a+b
if c<=23:
    print(c)
else:
    print(c-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())
if a + b >= 24:
  print((a + b) % 24)
else:
  print(a + b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def INSTR():
	return input()

def INNUM():
	return int(INSTR())

def INSTR_S():
	return INSTR().split()

def INNUM_S():
	return map(int, INSTR_S())

def INSTR_SM(n):
	return [tuple(INSTR_S()) for _ in range(n)]

def INNUM_SM(n):
	return [tuple(INNUM_S()) for _ in range(n)]

A, B = INNUM_S()
print((A + B) % 24)

Submission status: Accepted

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

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

print((a + b) % 24)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def remaining_time(A: int, B: int)->int:
    return (A+B) % 24


if __name__ == "__main__":
    A, B = map(int, input().split())
    ans = remaining_time(A, B)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
a,b = LI()
print((a+b)%24)
#B

#C
"""
n = I()
ans = int(math.log10(n)+1)
for i in range(2,int(n**0.5)+1):
    if n%i == 0:
        ans = min(ans, max(int(math.log10(i)+1),int(math.log10(n//i)+1)))
print(ans)
"""

#D
"""
n,a,b = LI()
v = LI()
v.sort()
v = v[::-1]
ans = v[:a]
d = {}
d[ans[-1]] = 0
if ans[0] != ans[-1]:
    for i in ans:
        if i == ans[-1]:
            d[i] += 1
    k = d[i]
    d[i] = 0
    for i in v:
        if i == ans[-1]:
            d[i] += 1
    c = 1
    for j in range(min(k,d[ans[-1]]-k)):
        c *= d[ans[-1]]-j
        c //= j+1
else:
    for i in v:
        if i == ans[-1]:
            d[i] += 1
    c = 0
    for k in range(a,min(d[ans[-1]],b)+1):
        p = 1
        for j in range(min(k,d[ans[-1]]-k)):
            p *= d[ans[-1]]-j
            p //= j+1
        c += p
print(sum(ans)/a)
print(c)
"""
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
x,y=map(int,input().split(' '))
z=x+y
if z>23:
    z=z-24
    print(z)
else:
    print(z)

Submission status: Accepted

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

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

Submission status: Accepted

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

C = (A+B)//24
print(A+B-C*24)

Submission status: Accepted

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

Submission status: Accepted

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

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 a + b >= 24:
    print((a + b) % 24)
else:
    print(a + b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(sum(list(int(i) for i in input().split()))%24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a, b = map(int, input().split())
print((a + b) % 24)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#57
a, b = map(int, input().split())
print((a+b)%24)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(sum([int(i) for i in input().split()]) % 24)

Submission status: Accepted

Solution code:
def main(a, b):
    result = (a + b)%24
    return result

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, X = list(map(int, input().split()))
ans = N + X
if ans > 23:
    ans -= 24
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if a+b >= 24:
  print(a+b-24)
else:
  print(a+b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# ABC057_A
""" Remaining Time """



def answer():
    """ A時にB時間足して、24で割った余りが答え """
    A, B = map(int, input().split())
    return (A + B) % 24


def main():
    """ 答えを出力する関数 """
    print(answer())


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 057 A - Remaining Time
a,b =map(int,input().split())
if a + b -24 < 0:
    print(a + b)
else:
    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:
A, B = map(int, input().split())
n = A + B
if n <= 23:
    print(n)    
else:
    print(n - 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:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


def main():
    A, B = li_input()
    print((A + B) % 24)


main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = (A + B) % 24

print(ans)
print()

Submission status: Accepted

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