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:
i = [int(s) for s in input().split()]
A = (i[0] + i[1]) // 24
if A == 0:
    print(i[0] + i[1])
else:
    print((i[0] + i[1]) - 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())

print((a+b)%24)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

a,b=mii()

p=a+b

if p>=24:
    p-=24
print(p)

Submission status: Accepted

Solution code:
#!python3

LI = lambda: list(map(int, input().split()))

# input
A, B = LI()


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


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

Submission status: Accepted

Solution code:
a=input()
b=a.split(' ')
c=[]

for i in range(2):
  c.append(int(b[i]))

print((c[0]+c[1])%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()) 
sum = A + B
if sum >= 24:
  sum = sum - 24
print(sum)

Submission status: Accepted

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

x = A + B

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

Submission status: Accepted

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

Submission status: Accepted

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

print((A+B)% 24)

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
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:
s = list(map(int, input().split()))
n=s[0]
k=s[1]
print((n+k)%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=map(int,input().split())

print(int((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())

tmp = a + b
print(tmp % 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())
print(int((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())) 

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
t1,t2 = list(map(int,input().strip().split()))

print((t1+t2)%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) % 24)

Submission status: Accepted

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

ans1 = A + B


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

Submission status: Accepted

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

A = int(time[0])
B = int(time[1])

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

else:
    print(A + B)

Submission status: Accepted

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

A = int(time[0])
B = int(time[1])

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

Submission status: Accepted

Solution code:
_input = input().split(" ")
_A = int(_input[0])
_B = int(_input[1])

if _A + _B < 24:
  print(_A + _B)
else:
  print(_A + _B - 24)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div
# endregion
A, B = ri_()
print((A + B) % 24)

Submission status: Accepted

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

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

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

print(start)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b = mi()
    print((a + b) % 24)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

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

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 print(a + b - 24)

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input().split()
a = int(n[0])
b = int(n[1])
c = a+b
if c >= 24:
  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(A + B if A + B < 24 else (A + B) - 24)

Submission status: Accepted

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

Submission status: Accepted

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

# map(int, input().rstrip().split())

def VI(N, init=0):
  return [init for _ in range(N)]
def VVI(N, M, init=0):
  return [[init for _ in range(M)] for _ in range(N)]

def VD(N, init=0.0):
  return [init for _ in range(N)]
def VVD(N, M, init=0.0):
  return [[init for _ in range(M)] for _ in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = list(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())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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())
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)%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:
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())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu May 14 16:42:47 2020

@author: shinba
"""

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

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

print(ans)

Submission status: Accepted

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

print ((a+b) % 24)

Submission status: Accepted

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


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:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

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

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

A,B = inputIL()

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)%24)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t1, t2 = map(int, input().split())

t_start = (t1 + t2) % 24
print(t_start)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_57_A()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

print((A+B)%24)

Submission status: Accepted

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

print( (a+b) % 24 )

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p=eval(input().replace(" ","+"));print(p-24if p>23else p)

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

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(abs(A+B-24)if 24<=A+B else A+B)

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=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( (A+B)%24 )

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())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if Ans <= 23:
    print(Ans)
else:
    print(Ans-24)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

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

Submission status: Accepted

Solution code:

def resolve():
    A, B = list(map( int, input().split() ))
    print(A+B if A+B < 24 else A+B-24)


if '__main__' == __name__:
    resolve()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

resolve()

Submission status: Accepted

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

A = a+b
B = A%24
print(B)

Submission status: Accepted

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

ans = a+b

if ans > 23:
    ans = ans - 24

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = a+b

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
result =a+b

if result > 24:
    print(result-24)
elif result == 24:
    print(0)
else:
    print(result)

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((a+b)%24)

Submission status: Accepted

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

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