Problem:


Score: 200 points

Problem Statement

Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid N yen (the currency of Japan) for it.

The consumption tax rate for foods in this shop is 8 percent. That is, to buy an apple pie priced at X yen before tax, you have to pay X \times 1.08 yen (rounded down to the nearest integer).

Takahashi forgot the price of his apple pie before tax, X, and wants to know it again. Write a program that takes N as input and finds X. We assume X is an integer.

If there are multiple possible values for X, find any one of them. Also, Takahashi's memory of N, the amount he paid, may be incorrect. If no value could be X, report that fact.

Constraints

1 \leq N \leq 50000

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If there are values that could be X, the price of the apple pie before tax, print any one of them.

If there are multiple such values, printing any one of them will be accepted.

If no value could be X, print :(.

Sample Input 1

432

Sample Output 1

400

If the apple pie is priced at 400 yen before tax, you have to pay 400 \times 1.08 = 432 yen to buy one.

Otherwise, the amount you have to pay will not be 432 yen.

Sample Input 2

1079

Sample Output 2

:(

There is no possible price before tax for which you have to pay 1079 yen with tax.

Sample Input 3

1001

Sample Output 3

927

If the apple pie is priced 927 yen before tax, by rounding down 927 \times 1.08 = 1001.16, you have to pay 1001 yen.



Sample input:
432


Sample output:
400

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N = INT()

x = N / 1.08
if int(int(x)*1.08) == N:
    print(int(x))
elif int(ceil(x)*1.08) == N:
    print(ceil(x))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
p = int(n/1.08)
for i in range(max(0,p-100),p+100):
    if i*1.08//1 == n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
x = n / 1.08

if int(int(x) * 1.08) == n:
    print(int(x))
elif int(int(x+1) * 1.08) == n:
    print(int(x+1))
else:
    print(':(')

Submission status: Accepted

Solution code:
n=int(input())
if int(n//1.08*1.08)==n:
    print(n//1.08)
elif int(-int(-n//1.08)*1.08)==n:
    print(-int(-n//1.08))
else:
    print(":(")

Submission status: Accepted

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

a = n // 1.08

for i in range(3):
    b = math.floor(a*1.08)
    if b == n:
        ans = round(a)
    else:
        a += 1
        ans = ":("
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

x1 = int(n/1.08)
x2 = x1+1

if n == int(x1*1.08):
    print(x1)
elif n == int(x2*1.08):
    print(x2)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
C = N/1.08
if C%1 == 1:
    print(int(C))
else:
    C -= (C%1)
    D = C+1
    if C*1.08-((C*1.08)%1) != N and D*1.08-((D*1.08)%1) != N:
        print(":(")
    elif C*1.08-((C*1.08)%1) == N:
        print(int(C))
    else:
        print(int(D))

Submission status: Accepted

Solution code:
n = int(input())
l = []
flag = 0

for x in range(-10, 11):
    l.append(int(n // 1.08) + x)

for x in l:
    if int(x * 1.08) == n:
        flag = 1
        print(x)
        break

if flag == 0:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
for i in range(N+1):
    if int(i*1.08) == N:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n=int(input())
nmin=int((n-1)/1.08)
nmax=math.ceil(n/1.08)
for i in range(nmin,nmax+1):
    if int(i*1.08)==n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    for x in range(50001):
        if int(x * 1.08) == N:
            print(x)
            exit()

    print(':(')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = np.ceil(n / 1.08)
if int(a * 1.08) == n:
    print(int(a))
else:
    print(':(')

Submission status: Accepted

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

ans = n/1.080
ans = int(ans)

#print(ans,math.floor(ans * 1.08))

if math.floor(ans * 1.08) == n:
    print(ans)
    exit()
else:
    for i in range(50000):
        if math.floor((ans+i) * 1.08) == n:
            print(int(ans+i))
            exit()
        if math.floor((ans+i) * 1.08) > n:
            print(':(')
            exit()
            
print(':(')

Submission status: Accepted

Solution code:
from sys import stdin
import math
N = int(stdin.readline().rstrip())
flag = False
for i in range(1,60000):
    if math.floor(i * 1.08) == N:
        flag = True
        break
if flag:
    print(i)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

t = False
for i in range(1, 50001):
    x = int(i*1.08)
    if x == n:
        t = True
        break

if t == True:
    print(i)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())


m = n // 1.08

if int(m * 1.08) == n:
    print(int(m))
elif int((m+1)* 1.08) == n:
    print(int(m+1))
elif int((m-1)*1.08) == n:
    print(int(m-1))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
x = int(n*0.8)

for i in range(x,n+10):
    if int(i*1.08)==n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
import math
n=int(input())
x=n//1.08
xx=math.floor(x*1.08)
xxx=math.floor((x+1)*1.08)
if xx==n:
    print(int(x))
elif xxx==n:
    print(int(x+1))
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())

if int(n//(1.08)+1)*1.08>=n+1:
  print(":(")
else:print(int(n//(1.08)+1))

Submission status: Accepted

Solution code:
N=int(input())


for i in range(1,50000):
    ans=int(i*1.08)
    if ans == N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
n = int(input())


def main():
    for x in range(1, n + 1):
        if (x * 108 // 100) == n:
            return x
    else:
        return -1


if __name__ == "__main__":
    v = main()
    if v == -1:
        print(':(')
    else:
        print(v)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    N = ii()
    n = int(N // 1.08)
    for i in range(n - 100, n + 100):
        if int(i * 1.08) == N:
            exit(i)
    print(":(")
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = 1e9

def main():
    n = int(input())
    x = n//1.08
    if int(x*1.08)==n:
        print(int(x))
    elif int((x+1)*1.08)==n:
        print(int(x+1))
    else:
        print(":(")
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#mitsui a
import sys
import math
import collections
#sys.setrecursionlimit(100000)

n=int(input())

#tmp = input().split()
#a,b = list(map(lambda a: int(a), tmp))
#tmp = input().split()
#c,d = list(map(lambda a: int(a), tmp))

for i in range(1,50001):
	if (i*1.08>=n)and(i*1.08<n+1):
		print(i)
		sys.exit()
print(":(")
sys.exit()

Submission status: Accepted

Solution code:
import math
N = int(input())
for i in range(1, 60000):
  if math.floor(i * 1.08) == N:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    for i in range(1, n + 1):
        res = i * 108 // 100
        if res == n:
            print(i)
            return
    
    print(':(')

main()

Submission status: Accepted

Solution code:
N = int(input())

def solve() :
    for i in range(50001) :
        if (i * 1.08) * 10 // 10 == N :
            return i
    
    return ':('
    
print(solve())

Submission status: Accepted

Solution code:


def main():
    import math
    N=int(input())
    ans=-1
    for i in range(1,N+1):
        if math.floor(i*1.08)==N:
            ans=i
            print(ans)
            break
    if ans==-1: print(":(")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

X1 = int((N) / 1.08)
X2 = int((N+1) / 1.08)

if (int(X1 * 1.08) == N):
    print(X1)
elif (int(X2 * 1.08) == N):
    print(X2)
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
a=n//27
b=n%27
if b==13 or b==26:
  print(":(")
else:
  if b<=12:
    print(n-a*2)
  else:
    print(n-a*2-1)

Submission status: Accepted

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

NO = ":("
def solve(N: int):
    for i in range(1,50001):
        if int(i*1.08) == N:
            print(i)
            return
    
    print(NO)
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

flag=True
for i in range(50000):
    if math.floor(i*1.08)==n:
        flag=False
        print(i)
        break

if flag:
    print(':(')

Submission status: Accepted

Solution code:
from math import floor,ceil

N = int(input())

check = lambda x: floor(x*1.08) == N

for p in range(floor(N/1.08),floor(N/1.08)+3):
    if check(p):
        print(p)
        break
else:
    print(':(')

Submission status: Accepted

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

n = int(input())

if (n/1.08)%1 == 0:
    x = int(n/1.08)
else:
    x = int((n+1)/1.08)
if int(x*1.08) != n:
    print(':(')
else:
    print(x)

Submission status: Accepted

Solution code:
N = int(input())

TAX = 1.08
X = int(N / TAX)

if int(X * TAX) == N:
  print(X)
elif int((X+1)*TAX) == N:
  print(X+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
n=int(input())
a=int(n/1.08)
b=-(-n//1.08)
if int(a*1.08)==n:print(a)
elif int(b*1.08)==n:print(int(b))
else:print(":(")

Submission status: Accepted

Solution code:
N = int(input())
import math
X = math.ceil(N / 1.08)

if math.floor(X * 1.08) == N:
    ans = X
else:
    ans = ':('
print(ans)

Submission status: Accepted

Solution code:
N=int(input())

kari=int(N/1.08)
#print(kari)

if int(kari*1.08)==N:
  print(kari)
elif int( (kari+1)*1.08)==N:
  print(kari+1)
else:
  print(':(')

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	N = int(input())
	y = int(N / 1.08)
	ans = None
	for i in range(y, y + 10):
		if int(i * 1.08) == N:
			ans = i
			break
	if ans is not None:
		print(ans)
	else:
		print(":(")

Submission status: Accepted

Solution code:
import math

words = lambda t : list(map(t, input().split()))
n = int(input())

x = n / 1.08
#print(x)
if math.floor(math.floor(x) * 1.08) == n:
    #print(1)
    print(math.floor(x))
elif math.floor(math.ceil(x) * 1.08) == n:
    #print(2)
    print(math.ceil(x))
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
for i in range(1, 50001):
  if (i * 1.08) // 1 == N:
    print(i)
    exit()
print(':(')

Submission status: Accepted

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


n = int(input())

p = n / 1.08

if p.is_integer():
    print(int(p))
elif math.floor(math.ceil(p)*1.08) == n:
    print(math.ceil(p))
elif math.floor(math.floor(p)*1.08) == n:
    print(math.floor(p))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
x = n / 1.08
a = math.ceil(x)
if math.floor(a * 1.08) == n:
	print(a)
else:
	print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
x1 = math.floor(n / 1.08)
x2 = math.ceil(n / 1.08)
if int(x1 * 1.08) == n:
  print(x1)
elif int(x2 * 1.08) == n:
  print(x2)
else:
  print(':(')

Submission status: Accepted

Solution code:
n=int(input())
import math
x1=math.ceil(n/1.08)
x2=math.floor(x1*1.08)
if n==x2:
    print(x1)
else:
    print(':(')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


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


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    for x in range(50000+1):
        if math.floor(x*1.08) == N:
            return x
    return ':('


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
for i in range(1,60000):
    x=(i*108)//100
    if x==n:
        print(i)
        exit()

print(":(")

Submission status: Accepted

Solution code:
N = int(input())

ans = int(N//1.08+1)

if int(ans*1.08)==N:
  print(ans)
else:
  print(":(")

Submission status: Accepted

Solution code:
N = int(input())
flag = 0
for i in range(50000):
    if int(i * 1.08) == N:
        print(i)
        flag = 1
        break
if flag == 0:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
import math
if 1.08 * (math.floor(n/1.08)) == n:
  print(math.floor(n/1.08))
  exit()
if math.floor(1.08 * (math.floor(n/1.08)+1)) == n:
  print(math.floor(n/1.08)+1)
  exit()
if math.floor(1.08 * (math.floor(n/1.08)+2)) == n:
  print(math.floor(n/1.08)+1)
  exit()
else:
  print(':(')

Submission status: Accepted

Solution code:
N = int(input())
a = N/1.08
b = (N+1)/1.08
ans = -1
for i in range(50001):
	if a <= i < b:
		ans = i
		break
if ans == -1:
	print(":(")
else:
	print(ans)

Submission status: Accepted

Solution code:
from math import floor
N = int(input())
for x in range(1,N+1):
  if N == floor(x*1.08):
    print(x)
    exit()
print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
a = math.floor(n/1.08)

if math.floor(a*1.08) == n:
    print(a)
elif math.floor((a+1)*1.08) == n:
    print(a+1)
else:
    print(':(')

Submission status: Accepted

Solution code:
# coding: utf-8
from math import floor, ceil
n = int(input())
tmp = n / 1.08

if tmp % 1 == 0:
    print(int(tmp))
else:
    f_tmp = floor(tmp)
    c_tmp = ceil(tmp)

    if floor(f_tmp * 1.08) == n:
        print(f_tmp)
    elif floor(c_tmp * 1.08) == n:
        print(c_tmp)
    else:
        print(':(')

Submission status: Accepted

Solution code:
from math import ceil, floor
N = int(input())

if floor(ceil(N / 1.08) * 1.08)==N:
    print(ceil(N / 1.08))
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

m = int(n/1.08)

while int(m * 1.08) >= n:
    m -= 1

while 1:
    if int(m * 1.08) > n:
        print(':(')
        exit()
    elif int(m * 1.08) == n:
        print(m)
        exit()
    m += 1

Submission status: Accepted

Solution code:
import math

N = int(input())

X = math.ceil(N / 1.08)
N2 = math.floor(X * 1.08)

if N == N2:
    print(X)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

for a in range(0, N+1):
    if int(a * 1.08) == N:
        print(a)
        break

else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

for i in range(50000):
    if int(i*1.08) == n:
        print(i)
        exit()

print(':(')

Submission status: Accepted

Solution code:
n=int(input())
x=int(n/1.08)
if x*1.08==n:
    print(x)
elif int((x+1)*1.08)==n:
    print(x+1)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

ans = ":("
for x in range(1, N + 1):
  n = int(x * 1.08)
  if n == N:
    ans = x
    break
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
koho=n*100//108

if koho*108//100==n:
  print(koho)
elif (koho+1)*108//100==n:
  print(koho+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())

ans = math.ceil(N*100/108)


if ans * 108 // 100 != N:
    print(":(")
else:
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
x = 1
while int(x * 1.08) < n:
    if int(x * 1.08) == n:
        break
    else:
        x += 1
if(int(x * 1.08) == n):
    print(x)
else:
    print(":(")

Submission status: Accepted

Solution code:
from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


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


def intsput():
    return map(int, sinput())


# Code

n = intput()

x = round(n / 1.08)


for t in range(x - 1000, x + 1000):
    if int(t * 1.08) == n and t > 0:
        print(t)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
N=int(input())
for i in range(1,N+1):
    if int(i*1.08)==N:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
def judge(N):
    a = int(N/1.08)
    gosa = [-1,0,1]
    for i in range(3):
        if N == int((a + gosa[i])*1.08):
            print(a+gosa[i])
            return
    print(":(")

N = int(input())
judge(N)

Submission status: Accepted

Solution code:
n = int(input())

x = int(n / 1.08 + 0.99999)
if (int(x * 1.08) == n):
    print(x)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
x = int(n // 1.08)
if x * 1.08 // 1 == n:
  print(x)
elif (x + 1) * 1.08 // 1 == n:
  print(int(x+1))
else: print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
output = ":("
a = math.ceil(N/1.08)
if int(1.08*a) == N:
    output = a
print(output)

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby

n = int(stdin.readline().rstrip())
t = True
for el in range(0, 50000):
    if int(el * 1.08) == n:
        t = False
        print(el)

if t:
    print(':(')

Submission status: Accepted

Solution code:

def main():
    N = int(input())
    tmp =int( N / 1.08)
    if int(tmp*1.08) == N:
        print(tmp)
    elif int((tmp+ 1)*1.08) == N:
        print(tmp+ 1)
    else:
        print(":(")
    return 

main()

Submission status: Accepted

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

X = N // 1.08

if math.floor((X + 1) * 1.08) == N:
    print(int(X + 1))
elif math.floor(X * 1.08) == N:
    print(int(X))
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

X = N // 1.08
X = int(X+1)
if int(X * 1.08) == N: print(X)
else: print(':(')

Submission status: Accepted

Solution code:
X=int(input())

for i in range(50001):
  if i*1.08//1==X:
    print(i)
    exit()

print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
cnt = -1
for i in range(math.ceil(N/1.08),math.ceil((N+1)/1.08)):
    cnt = i
if cnt>0:
    print(cnt)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
N = int(input())
X = int(N // 1.08)

for i in range(X - 1, X + 2):
    if N <= i * 1.08 < N + 1:
        print(i)
        sys.exit(0)
print(":(")

Submission status: Accepted

Solution code:
n = int(input())

ans = ":("
for i in range(n+1):
    if int(i * 1.08) == n:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
flag = True

for i in range(1,n+1):
    if n == int(i*1.08):
        print(i)
        flag = False
        break
if flag:
    print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
no = math.ceil(n/1.08)
if n == math.floor(no*1.08):
    print(no)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

X = -(-N // 1.08)

if math.floor(X * 1.08) != N:
    print(":(")
else:
    print(int(X))

Submission status: Accepted

Solution code:
import math
def main():
    N = int(input())
    for i in range(50000):
        ans = math.floor(i*1.08)
        if ans == N:
            print(i)
            exit()
    print(":(")
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

n = int(input())

for i in range(1, 50001):
    if i * 1.08 == n or math.floor(i*1.08) == n:
        print(i)
        exit()

print(":(")

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
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
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    for i in range(2*N+1):
        if int(i*1.08)==N:
            print(i)
            exit()
    print(":(")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

flag = False
for i in range(1, 50001):
  if math.floor(i * 1.08) == n:
    print(i)
    flag = True 

if not flag:
  print(":(")

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())
for i in range(1,46299):
    d = int(i*1.08)
    if d>50000:
        break
    if d==N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1, 50000):
	if int(i*1.08) == n:
		print(i)
		break
else:
	print(":(")

Submission status: Accepted

Solution code:
N = int(input())

if int((N // 1.08) * 1.08) == N:
    print(int(N // 1.08))
    exit()
if int((N // 1.08 + 1) * 1.08) == N:
    print(int(N // 1.08 + 1))
    exit()
print(':(')

Submission status: Accepted

Solution code:
n = int(input())

m = int(n/1.08)

ml1 = [m,m+1]
ml2 = [int(m*1.08) , int((m+1)*1.08)]

if n in ml2:
    print(ml1[ml2.index(n)])
else:
    print(':(')

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
ans = N // 1.08

if math.floor(ans * 1.08) == N:
    print(int(ans))
elif math.floor((ans + 1) * 1.08) == N:
    print(int(ans + 1))
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
import math
from itertools import permutations
from itertools import combinations

#input = sys.stdin.readline
sys.setrecursionlimit(10**7)
N = int(input())

pos = int(N//(1.08))
pos2 = (pos+1)
pos3 = (pos-1)

if int(pos*(1.08))==N:
    print(pos)
elif int(pos2*(1.08))==N:
    print(pos2)
elif int(pos3*(1.08))==N:
    print(pos3)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

a = math.ceil(N / 1.08)

if math.floor(a * 1.08) == N:
  print(a)
else:
  print(":(")

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())

for i in range(50000+1):
    if int(i*1.08)== n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())
X = int(N/1.08)
if N == int((X-1)*1.08):
  print(X-1)
elif N == int((X+0)*1.08):
  print(X)
elif N == int((X+1)*1.08):
  print(X+1)
elif N == int((X+2)*1.08):
  print(X+2)
else:
  print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

div_min = math.floor(100*(n/108))
div_max = math.ceil(100*(n/108))

if int(div_min * 1.08) == n:
    print(str(div_min))
elif int(div_max * 1.08) == n:
    print(str(div_max))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

ans = -( -n // 1.08)

if int(ans * 1.08) == n:
    print(int(ans))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

def read():
    N = int(input().strip())
    return N,


def solve(N):
    tax = 1.08
    x_lower = math.floor(N / tax)
    x_upper = math.ceil(N / tax)
    for x in range(x_lower, x_upper+1):
        if math.floor(x * tax) == N:
            return x
    return ':('
    
if __name__ == '__main__':
    inputs = read()
    output = solve(*inputs)
    print("%s" % output)

Submission status: Accepted

Solution code:
N=int(input())

x=int(N/1.08)
if ((x-1)*1.08)//1==N:
  print(x-1)
elif (x*1.08)//1==N:
  print(x)
elif ((x+1)*1.08)//1==N:
  print(x+1)
else:
  print(":(")

Submission status: Accepted

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

x = n // 1.08

if math.floor((x+1)*1.08) == n:
    print(int(x+1))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
X = math.ceil(N/1.08)

if N != int(X*1.08):
    print(':(')
else:
    print(X)

Submission status: Accepted

Solution code:
from math import floor, ceil
n = int(input())

cost = n / 1.08

if n == int(1.08*floor(cost)):
    print(floor(cost))
elif n == int(1.08*ceil(cost)):
    print(ceil(cost))
else:
    print(":(")

Submission status: Accepted

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

ans = None
for i in range(1, 50001):
    v = math.floor(i * 1.08)
    if v == N:
        ans = i
if ans is not None:
    print(ans)
else:
    print(":(")

Submission status: Accepted

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

result = ":("
for i in range(50000+1):
    if int(i*1.08) == n:
        result = i
        break

print(result)

Submission status: Accepted

Solution code:
n = int(input())
b_num = n // 1.08
b_num_1 = b_num + 1
if int(b_num * 1.08) == n:
    print(int(b_num))
elif int(b_num_1 * 1.08) == n:
    print(int(b_num_1))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
n2 = int(n / 1.08)
if int(n2 * 1.08) == n:
    print(n2)
elif int((n2 + 1) * 1.08) == n:
    print(n2 + 1)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

update = False
for X in range(N+1):
    if X*108//100 == N:
        update = True
        print(X)
        break
if not update:
    print(':(')

Submission status: Accepted

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

X = N / 1.08
x1 = math.floor(X)
x2 = math.ceil(X)

if math.floor(x1 * 1.08) == N:
    print(x1)
elif math.floor(x2 * 1.08) == N:
    print(x2)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
x = -(-n//1.08)
x_cor = int(x*1.08)
if n!=x_cor:
  print(":(")
else:
  print(int(x))

Submission status: Accepted

Solution code:
n = int(input())
x = n//1.08
x = int(x)
for i in range(x-10,x+10):
    y = i*1.08
    y = int(y)
    if n==y:
        print(i)
        exit()
    else:
        continue
print(":(")

Submission status: Accepted

Solution code:
n=int(input())
a=int(-(-n//1.08))
print(a if int(a*1.08)==n else ':(')

Submission status: Accepted

Solution code:
N = int(input())
x = int(N/1.08)

if x*1.08//1==N:
  print(x)
elif (x+1)*1.08//1==N:
  print(x+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
#input = sys.stdin.readline
import math

#import bisect

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(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 kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def main():
#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]
    n=int(input())
    x=int(n//1.08)
  #  print(x)
    a=":("
    if int(x*1.08)==n:
        a=int(x)
    elif int((x+1)*1.08)==n:
        a=int(x+1)
    elif int((x-1)*1.08)==n:
        a=int(x-1)
    print(a)


#    print(n,kingaku(a,b,x))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input()) # 数字を変数に格納

flag = 0

for i in range(1,50000):
    if int(i * 1.08) == N:
        print(i)
        flag = 1
        break
    
if flag == 0:
    print(":(")

Submission status: Accepted

Solution code:
def main():
    N = int(input())

    if N == int(int(N/1.08) * 1.08):
        print(int(N/1.08))
    elif N == int((int(N/1.08) - 1) * 1.08):
        print(int(N / 1.08) - 1)
    elif N == int((int(N/1.08) + 1) * 1.08):
        print(int(N / 1.08) + 1)
    else:
        print(":(")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
n = int(input())
a = int(n/1.08)
if math.floor(a*1.08) == n:
    print(a)
elif math.floor((a+1)*1.08) == n:
    print(a+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
a = math.ceil(n/1.08)
if int(a * 1.08) == n:
	print (a)
else:
	print (":(")