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: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
n=int(input())
f=[]
for a in range(1,math.ceil(n**(1/2))):
    if n%a==0:
        f.append(len(str(n//a)))
print(min(f))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
import math
sq = math.sqrt(n)
if isinstance(sq, int):
    print(len(str(sq)))
    quit()
"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""
# n == 1のとき、[1, 1]を返す
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)
            #arr.append([i, cnt])

    if temp!=1:
        #arr.append([temp, 1])
        arr.append(temp)

    if arr==[]:
        #arr.append([n, 1])
        arr.append(n)
    return arr
factor = factorization(n)
if len(factor) == 1:
    print(len(str(n)))
    quit()
first = 1
ans = float('Inf')
for i in range(len(factor) - 1):
    first *= factor[i]
    second = int(n / first)
    #print(first, second)
    ans = min(ans, max(len(str(first)), len(str(second))))
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

ans = a+b

if ans > 24:
    ans -=24

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans=a+b

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if (a>b):
    s=a+b
    s=s%24
if (b>a):
    s=a-b
if (s<=0):
    s=s*-1

print(s)

Submission status: Runtime Error

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

if (a + b) < 25:
  print(a + b)

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

Submission status: Runtime Error

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

if (a + b) < 25:
  print(a + b)

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())

# def is_prime(n):
#     if n == 1:
#         return False
#     for i in range(2,int(n**0.5)+1):
#         if n % i == 0:
#             return False
#     return True

# if is_prime(n):
#     print(len(str(n)))
#     exit()

# rtn = math.floor(math.sqrt(n))

# for i in range(rtn,n+1):
#     if n % i == 0:
#         print(len(str(i)))
#         exit()

# n = a * b = b * aでなのでa<=bのaの方を求めてその時のbの桁数出力すれば間に合う。
# 上記のようにbの方から求めるとぎり間に合わない。

rtn = math.ceil(math.sqrt(n))
for i in reversed(range(1, rtn + 1)):
    if n % i == 0:
        b = n // i #求めるのはa(=i)ではなくbの方
        print(len(str(b)))
        exit()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

P=[]
n=int(input())
N=int(math.sqrt(n))

for i in range(1,n+1):
  if n%i==0:
    p=max(len(str(i)),len(str(int(n/i))))
    P.append(p)
    
print(min(P))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#ABC057.B
N,M = map(int,input().split())
L1 = []
L2 = []

for i in range(N):
    a,b = map(int,input().split())
    L1.append([a,b])
for m in range(M):
    c,d = map(int,input().split())
    L2.append([c,d])

for j in range(N):
    L3 = []
    for l in range(M):
        L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l][1]))
    print(L3.index(min(L3))+1)

Submission status: Runtime Error

Solution code:
#ABC057.B
N,M = map(int(input().split()))
L1 = []
L2 = []

for i in range(N):
    a,b = map(int,input().split())
    L1.append([a,b])
for m in range(M):
    c,d = map(int,input().split())
    L2.append([c,d])

for j in range(N):
    L3 = []
    for l in range(M):
        L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l][1]))
    print(L3.index(min(L3)+1)

Submission status: Runtime Error

Solution code:
n = int(input())
ele = []
i = 1
while i * i <= n:
    if n % i == 0:
        ele.append([len(str(i)),len(str(n // i))])
    i += 1

k = max(ele[0][1],ele[0][0])
for i in range(len(ele)):
    k = min(max(ele[i][0],ele[i][1]),k)
print(k)

Submission status: Runtime Error

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():
    N,M=map(int,input().split())
    A=[list(map(int,input().split())) for i in range(N)]
    B=[list(map(int,input().split())) for i in range(M)]

    for i in A:
        valmin=10**5
        cnt=0
        for j in B:
            if abs(i[0]-j[0])+abs(i[1]-j[1])<valmin:
                valmin=abs(i[0]-j[0])+abs(i[1]-j[1])
                ans=cnt+1
            cnt+=1
        print(ans)





resolve()

Submission status: Runtime Error

Solution code:
N=int(input())
n=len(str(N))
m=(n//2)
def wari(x):
    array=[]
    if m==0:
        for j in range(9,0,-1):
            if N%j==0:
                c=max(len(str(N//j)),len(str(j)))
                array.append(c)
                break
        
    for i in range(m+1):
        if i==0:
            for j in range(9,0,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
        else:
            for j in range((10**(i+1))-1,(10**i)-1,-1):
                if N%j==0:
                    c=max(len(str(N//j)),len(str(j)))
                    array.append(c)
                    break
    return min(array)
print(wari(N))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A,B=map(str,input().split())
#print(sorted(B)[0])
print((A+B)%24)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
def check():
    N,A,B = [int(i) for i in input().split()]
    V = sorted([int(i) for i in input().split()], reverse=True)
    mean = sum(V[:A])/A
    print(mean)
    count_dict = dict(Counter(V))
    
    max_v_cnt = list(count_dict.values())[0]
    if max_v_cnt > A:
        cnt = 0
        for i in range(A,max_v_cnt+1):
            cnt += comb(max_v_cnt, i)
    else:
        for v, c in count_dict.items():        
            if A - c < 0:
                last_c = c
                break
            A -= c    
        cnt = comb(last_c, A)
    print(cnt)

check()

Submission status: Runtime Error

Solution code:
n, m = map(int,input().split())
students = [None]*n
points = [None]*m
students[i] = [tuple(map(int, input.split())) for _ in range(n)]
points[i] = [tuple(map(int, input.split())) for _ in range(m)]

ans = []
for s in students:
  tmp = []
  for p in points:
    tmp.append(abs(s[0] - p[0]) + abs(s[1] - p[1]))
  ans.append(tmp.index(min(tmp)) + 1)
for i in range(n):
  print(ans[i])

Submission status: Runtime Error

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

print(24 % a + b)

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:
A = int(input())
B = int(input())

print((A+B)%24)

Submission status: Runtime Error

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

print((A+B)%24)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
fn main() {
    let a: i32 = read();
    let b: i32 = read();
    let ans = (a+b) % 24;
    println!("{}", ans);
}

// 以下関数

use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

pub const MOD: u64 = 10e9 as u64 + 7;

pub fn is_prime(n: i32) -> bool {
    if n < 2 {
        return false;
    } else if n == 2 {
        return true;
    }
    let mut i = 2;
    while i * i < n {
        if n % i == 0 {
            return false;
        } else {
            i += 1;
            continue;
        }
    }
    true
}

pub fn lcm(mut n: i32, mut m: i32) -> i32 {
    n = if n > m { m } else { n };
    m = if n > m { n } else { m };
    let mut i = n;
    while i % m != 0 {
        i += n;
    }
    i
}

pub fn abs(n: i32) -> i32 {
    if n >= 0 {
        n
    } else {
        -n
    }
}

pub fn max(n: i32, m: i32) -> i32 {
    if n >= m {
        n
    } else {
        m
    }
}

pub fn min(n: i32, m: i32) -> i32 {
    if n <= m {
        n
    } else {
        m
    }
}

Submission status: Runtime Error

Solution code:
def ncr(x,y):
	ans=1
	q=x-y
	while x>y:
		ans*=x
		x=x-1
	
	while q>1:
		ans=ans/q
		q=q-1
	
	return ans

x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=[0]*n
x = input().split()
ind=0
M={1:0}
M2={1:0}
for i in x:
	v[ind]=int(i)
	if int(i) in M:
		M[v[ind]]+=1
	else:
		M[v[ind]]=1
	ind+=1
v.sort(reverse=True)

cnt=0
ind=0
m=0
while cnt<a:
	cnt+=1
	m=((cnt-1)*m+v[ind])/cnt
	if v[ind] in M2:
		M2[v[ind]]+=1
	else:
		M2[v[ind]]=1
	ind+=1
while cnt<b:
	if (cnt*m+v[ind])/(cnt+1)<m-0.5:
		break
	else:
		cnt+=1;
		if v[ind] in M2:
			M2[v[ind]]+=1
		else:
			M2[v[ind]]=1
		ind+=1
print(m)
maxw=cnt;
ways=0;
for i in range(cnt,a-1,-1):
	if v[ind-1] not in M2:
			M2[v[ind]]=0
	if v[ind-1] not in M:
			M[v[ind-1]]=0
	ways+=ncr(M[v[ind-1]],M2[v[ind-1]])
	
	M2[v[ind-1]]-=1

print(int(ways))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=input()
a=a+b
if a-24>=0:
  print(a-24)
else:
  print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

n = int(input())
i = int(math.sqrt(n))
prime = False

x = 2
while x<=i:
  if n%x==0:
    prime = True
    break
  x+=1

if prime==True:
  print(len(str(n)))
else:
  while i<=n:
    if n%i==0:
      print(len(str(i)))
      break
    i+=1

Submission status: Runtime Error

Solution code:
nm = [int(x) for x in input().split()]
n = nm[0]
m = nm[1]
students = []
checkpoints = []
distances = []
for i in range(n):
  students.append([int(x) for x in input().split()])
for i in range(m):
  checkpoints.append([int(x) for x in input().split()])
  
for i in students:
  for j in checkpoints:
    distances.append(abs(j[0]-i[0])+abs(j[1]-i[1]))
  print(distances.index(min(distances))+1)
  distances = []

Submission status: Runtime Error

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

if A < B:
    print(A+B)
elif A == 0 and B == 0:
    print(0)
elif A != 0 and B==0:
    print(0)
elif A > B:
    print((A+B-24)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
a = []
b = []

for i in range(1, N//2):
    if N % i ==0:
        a.append(i)
        b.append(N/i)

aa = list(map(str, a))        
bb = list(map(str, b))
ans = []

for i in range(len(aa)):
    ans.append(max(len(aa[i]), len(bb[i])))

print(min(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,a,b=map(int,input().split())
v=list(map(int,input().split()))
v.sort()
v.reverse()
ave=0
for i in range(a):
  ave+=v[i]
  
print(ave/a)

l=0
for j in range(a,b):
  if v[a-1]==v[j]:
    l+=1
    
p=v.count(v[a-1])

from math import factorial
a=factorial(p) / factorial(p-l) / factorial(l)
print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input())
print((a+b)//24)

Submission status: Runtime Error

Solution code:
A
 
B

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
ans = len(str(n))
for i in range(1, int(n**(1/2))+1):
  if n%i == 0:
    ans = min(ans, max(len(str(i)), len(str(n//i))))
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print((A + B) % 24)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import operator as op
import numpy
import math

def combination_table(N):
	C = []
	for i in range(N+1):
		C.append([0] * (N+1))
	for i in range(N+1):
		for j in range(i+1):
			if (j==0 or j==i):
				C[i][j] = 1
			else:
				C[i][j] = C[i-1][j-1]+C[i-1][j]
	return C

if __name__ == "__main__":
	N, A, B = stdin.readline().split(" ")
	N = int(N)
	A = int(A)
	B = int(B)
	V = []
	line = stdin.readline().split(" ")
	unique_elements = dict()
	for e in line:
		V.append(int(e)) 
		if not int(e) in unique_elements:
			unique_elements[int(e)] = 1
		else:
			unique_elements[int(e)] += 1
	V.sort(reverse=True)

	C = combination_table(N)

	# find optimal selections between A and B
	optimal = [A]
	highest_avg = -1
	for i in range(A, B+1):
		avg = float(sum(V[:i])) / float(i)
		if (avg > highest_avg):
			highest_avg = avg
			optimal = [i] # reset the list
		elif (avg == highest_avg):
			if not i in optimal:
				optimal.append(i)

	total = 1
	for e in optimal:
		# unique elements and count in for optimal value
		op_elemements = dict()
		for i in range(e):
			if V[i] in op_elemements:
				op_elemements[V[i]] += 1
			else:
				op_elemements[V[i]] = 1

		# find the sum
		for key, value in op_elemements.items():
			# print (unique_elements[key], value, C[unique_elements[key]][value])
			total = total * C[unique_elements[key]][value]

	print ("{:6f}".format(highest_avg))
	print (int(total))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,A,B = list(map(int,input().split()))
 
v = list(map(int,input().split()))
 
v.sort()
v=v[::-1]
 
a=v[A-1]
is_first = True
end=-1
for i in range(N):
    if v[i]==a:
        if is_first:
            first=i
            is_first=False
    else:
        if not is_first:
            end=i
            break
 
def comb(n,k):
    a = 1
    b = 1
    for i in range(min(n-k,k)):
        a*=n-i
        b*=i+1
    return a//b
#print(comb(3,1))
if end==-1:
    end=N
if first==0 and end>=B:
    print(a)
    print(sum([comb(end,i) for i in range(A,min(B+1,end+1))]))
else:
    print(sum(v[:A])/A)
    print(comb(end-first,A-first))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 10**10 #適当に初期化
ans_ = 10**10

divisors = []
for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        divisors.append(i)
        if i != N // i:
            divisors.append(N//i)
            if len(str(N//i))<=ans:
                ans =N//i
                ans_=i
            
if N ==1:
    ans =1
            
print(max(len(str(ans)),len(str(ans_))))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors

N = int(input())
prime_list = prime_factors(N)

X = 0
Y = 0

if len(prime_list) <= 2:
    prime_list.append(1)

if prime_list and len(prime_list) >= 2:
    X = prime_list.pop(-1)
    Y = prime_list.pop(-1)
    for L in reversed(prime_list):
        if X <= Y:
            X = X*L
        
        else:
            Y = Y*L

if X >= Y:
    print(len(str(X)))
else:
    print(len(str(Y)))

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:

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

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

Submission status: Runtime Error

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: 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:
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 math
n=int(input())
l=[]
for i in range(1,int(math.sqrt(n))+2):
    if n%i==0:
        l+=[max(len(str(i)),len(str(n//i)))]
print(min(l))

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(sum(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:
a,b = list(map(int, input().split()))
print(mod(a+b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"
using namespace std;


/* macro */
#define rep(i,a,b) for(int i=a;i<b;i++)
#define revrep(i,a,b) for(int i = a; i > b; i--)
#define int long long
#define exist(s,e) ((s).find(e)!=(s).end())
#define all(v) (v).begin(), (v).end()
#define each(s,itr) for(auto (itr) = s.begin(); (itr) != s.end(); (itr)++)
#define sum(v) accumulate(all(v), (0LL))
#define sec second
#define fir first
#define pb push_back



/* alias */
template<class T> using vec = vector<T>;
typedef vector<int> vi;
typedef pair<int, int> pi;


/* constant */
//const int inf = pow(2, 62);
//const int mod = 1e9 + 7;
const int mod = 100000;
int dx[8]={1,0,-1,0,-1,1,-1,1};
int dy[8]={0,1,0,-1,-1,-1,1,1};



/* io_method */
int input(){int tmp;cin >> tmp;return tmp;}
string raw_input(){string tmp;cin >> tmp;return tmp;}
string readline(){string s;getline(cin, s);return s;}
template<class T> void printx(T n){cout << n;}
template<class T, class U> void printx(pair<T, U> p){cout << "(" << p.first << "," << p.second << ")";}
template<class T> void printx(vector<T> v){cout << "{";rep(i,0,v.size()){printx(v[i]);if(i != v.size()-1)printx(",");}cout << "}";}
template<class T> void print(T n){printx(n);cout << endl;}
template<class T> void print(set<T> s){cout << "{";each(s, e){if(e != s.begin()) printx(",");printx(*e);}cout << "}" << endl;}
template<class T, class U> void print(map<T, U> mp){cout << "{";each(mp, e){cout << "(" << e -> first << "," << e -> second << ")";}cout << "}" << endl;}


/* general_method */
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }




/* main */
int ceil(int a, int b){
    if(a % b == 0) return a /b;
    else return a /b + 1;
}


signed main(){

    cin.tie(0);
    ios::sync_with_stdio(false);

    
    int a, b; cin >> a >> b;

    print((a + b) % 24);




    
    



    
    

    







   




    

    

    




    



    



    

 
    
    


    

    
   
    













}

Submission status: Runtime Error

Solution code:
import math
N=int(input())
if N==1:
	print(1)
else:
	nmax = math.ceil(math.sqrt(N))
	Bdigimin = 10
	for i in range(nmax):
		if N % (i+1) == 0:
			Bdigi = math.floor(math.log10(N/(i+1)))
			if Bdigimin > Bdigi:
				Bdigimin = Bdigi
	print(int(Bdigimin+1))

Submission status: Runtime Error

Solution code:
import math
N=int(input())
nmax = math.floor(math.sqrt(N))
Bdigimin = 10
for i in range(1,nmax):
	if N % i == 0:
		Bdigi = math.floor(math.log10(N/i))
		if Bdigimin > Bdigi:
			Bdigimin = Bdigi
print(int(Bdigimin+1))

Submission status: Runtime Error

Solution code:
import math
N=int(input())
nmax = math.floor(math.sqrt(N))
Bdigimax = 1
for i in range(1,nmax):
	if N % i == 0:
		Bdigi = math.floor(math.log10(N/i))
		if Bdigimax < Bdigi:
			Bdigimax = Bdigi
print(int(Bdigimax))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N,A,B=map(int,input().split())
v=list(map(int,input().split()))
a=v.sort()[-A:]
print(sum(a)/A)
b=v.count(a[0])
c=a.count(a[0])
if c!=A:
    print(math.factorial(b)//(math.factorial(c)*math.factorial(b-c)))
else:
    l=[]
    i=min([b-c,B-A])
    for k in range(0,i+1):
        l.append(math.factorial(b)//(math.factorial(c+k)*math.factorial(b-c-k)))
    print(sum(l))

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

ab_list = []
cd_list = []

for i in range(N):
    ab = list(map(int, input().split()))
    ab_list.append(ab)

for i in range(M):
    cd = list(map(int, input().split()))
    cd_list.append(cd)

for a, b in ab_list:
    num = -1
    min_num = 10 ** 10 + 1
    count = 0
    for c, d in cd_list:
        count += 1
        distance = abs(a-c) + abs(b-d)
        if distance < min_num:
            min_num = distance
            num = count
    print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <math.h>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <algorithm>
#include <iomanip>
#include <string.h>

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define ALL(a)  (a).begin(),(a).end()

typedef long long lint;

using namespace std;

int main(){
  int A,B;
  cin>>A>>B;
  cout<<(A+B)%24<<endl;
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N = int(input())
ans = len(str(N))
for A in range(1, int(math.sqrt(N)) + 1):
	if N % A == 0:
		B = N // A
		ans = min(ans, max(len(str(A)), len(str(B))))
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N = int(input())

n = int(math.sqrt(N))+1
#print(n)
def digit(x):
    if 100<= x <1000:
        return 3
    elif 1000 <= x < 10000:
        return 4
    elif 10000 <= x < 100000:
        return 5
    elif 100000 <= x < 1000000:
        return 6
    elif 1000000 <= x < 10000000:
        return 7
    elif 10000000 <= x < 100000000:
        return 8
    elif 100000000 <= x < 10000000000:
        return 9
    else:
        return 10

while True:
    if(N % n == 0):
        k = N / n
        print(digit(k))
        break
    n-=1

Submission status: Runtime Error

Solution code:
// header {{{
#include <bits/stdc++.h>
using namespace std;

// {U}{INT,LONG,LLONG}_{MAX,MIN}
#define INF         INT_MAX/3
#define LLINF       LLONG_MAX/3
#define MOD         (1000000007LL)
#define MODA(a, b)  a=((a)+(b))%MOD
#define MODP(a, b)  a=((a)*(b))%MOD
#define inc(i, l, r)   for(int i=(l);i<(r);i++)
#define dec(i, l, r)   for(int i=(r)-1;i>=(l);i--)
#define pb          push_back
#define se          second
#define fi          first
#define mset(a, b)  memset(a, b, sizeof(a))

using LL  = long long;
using G   = vector<vector<int>>;

int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
// }}}

int main() {
    cin.tie(0);ios::sync_with_stdio(false);
    int a, b;cin >> a >> b;
    cout << (a+b)%24 << endl;
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
(t if t < 24 else t-24)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = map(int, raw_input().split())
print S[0] + S[1]

Submission status: Runtime Error

Solution code:
S = map(int,raw_input().split( ))
print S[0] + S[1]

Submission status: Runtime Error

Solution code:
S = raw_input().split( )
print S[0] + S[1]

Submission status: Runtime Error

Solution code:
import math
N = int(input().rstrip())

def f(a,b):
    a = str(a)
    b = str(b)
    return len(a) if len(a) > len(b) else len(b)

n = int(math.sqrt(N)) 
ans = len(str(N))
for a in range(1,n+1):
    if N % a == 0:
        b = N // a
        res = f(a,b)
        if res < ans:
            ans = res
print(ans)

Submission status: Runtime Error

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

h = a + b

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
a, b = sys.stdin.readline().split()

print((a+b)%24)

Submission status: Runtime Error

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

printf((a + b) % 24)