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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

def bs(ok, ng, solve):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok

ok = n
ng = 0
ans = bs(ok, ng, lambda x: x * 1.08 >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
# B - Tax Rate

N = int(input())

for i in range(1, 50001):
    if int(i * 1.08) == N:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
C =  int(N/1.08)
flag = False
for i in range(0, 2):
    if int((C+i)*1.08) == N:
        print(C+i)
        flag = True
if not flag:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = int(n / 1.08 - 2)
for i in range(x, x + 4):
    if int(i * 108 // 100) == n:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())

x_ = N//1.08
ans = ':('
for i in range(1,100000):
    x = x_+i
    if int(1.08*x) == N:
        ans = int(x)
        break

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

import math
import sys

for i in range(1, 50000+1):
  if math.floor(i * 1.08) == N:
    print(i)
    sys.exit()
print(":(")

Submission status: Accepted

Solution code:
N=int(input())

c=1
for i in range(1,50001):
    if int(i*1.08)==N:
        c=0
        print(i)
        
if c==1:
    print(":(")

Submission status: Accepted

Solution code:
from decimal import Decimal
N = int(input())
M = int(N/Decimal(1.08)) + 1
if N == int(M*Decimal(1.08)) :
    print( int(M))
else :
    print(':(')

Submission status: Accepted

Solution code:
# N=1079
N=int(input())

a=int(N*100/110)-1

flg=False

for i in range (N-a+1):
    if ((a+i)*1.08)//1==N:
        print(a+i)
        exit()
    else:
        pass
print(':(')

Submission status: Accepted

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

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

print(":(")

Submission status: Accepted

Solution code:
import math
#入力
x = int(input())
x_upper = (x+1) / 1.08
x_lower = x / 1.08
x_candidate = math.ceil(x_lower)
if x_lower <= x_candidate < x_upper:
    print(x_candidate)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
for x in range(1,100000):
  if x*108//100==N:
    print(x)
    break
if x==99999:
  print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

ans = math.ceil(n/1.08)

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

Submission status: Accepted

Solution code:
def resolve():
    from decimal import Decimal
    N = Decimal(input())
    for X in range(1, 50000+1):
        if (int(X * 1.08) == N):
            print(X)
            return
    print(':(')

    return

resolve()

Submission status: Accepted

Solution code:
import math
n=int(input())
ans=-1
for x in range(0,50000):
  if n==math.floor(x*1.08):
    ans=x
    break
if ans==-1:
  print(":(")
else:
  print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    import math as m
    N = int(input())
    nn = m.ceil(N / 1.08)
    if m.floor(nn * 1.08) == N:
        print(nn)
    else:
        print(":(")


resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input()) * 100
m = N // 108
if int(m * 1.08) == N//100:
    print(m)
elif int((m+1) * 1.08) == N//100:
    print(m+1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, 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, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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
from decimal import *

N = input()

for i in range(1, int(N)+1):
	if int(Decimal(str(i))*Decimal("1.08")) == int(N):
		print(i)
		exit()
else:
	print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

for i in range(1, 50001):
    x = math.floor(i * 1.08)
    if x == n:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
 
# Input the amount of money Takahashi paid
N = int(input())
 
# Find nearest integer price more than or equal to X/1.08
X = math.ceil(N / 1.08)
 
# Check if the "taxed price" is equal to N yen
if math.floor(X * 1.08) == N:
	print(X)
else:
	print(":(")

Submission status: Accepted

Solution code:
N=int(input())
n=N//1.08
a=int(n*1.08)
b=int((n+1)*1.08)
print(int(n) if a==N else int(n+1) if b==N else ":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
rate = 1.08
# print((N / rate))
# print((N + 1) / rate)
a = math.ceil(N / rate)
b = math.ceil((N + 1) / rate)
# print(a)
# print(b)
if a >= b:
    print(":(")
else:
    # assert math.floor(a * rate) == N
    print(a)

Submission status: Accepted

Solution code:
import math

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

s = str(math.floor(M)) if N == int(math.floor(M)*1.08) else  str(math.ceil(M)) if N == int(math.ceil(M)*1.08) else ':('

print(s)

Submission status: Accepted

Solution code:
from math import ceil
from sys import stdin
N = int(stdin.readline().rstrip())
ans = ceil(N / 1.08)
if int(ans * 1.08) == N:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
lx = math.ceil(n/1.08)
rx = (n+1)/1.08
print(lx if lx<rx else ':(' )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
for i in range(N+100):
    if int(i * 1.08) == N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
downer = math.ceil(N/1.08)
upper = math.floor((N+1)/1.08-0.0000000001)
A = [i for i in range(downer,upper+1)]
for i in range(len(A)):
    if math.floor(A[i]*1.08) == N:
      print(A[i])
      exit()
print(':(')

Submission status: Accepted

Solution code:
n = int(input())

import math

x = math.ceil(n / 1.08)
m = math.floor(x * 1.08)

if m == n:
    print(int(x))
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
N=int(input())
a=N//1.08
c=a+1
d=a-1
b=a*1.08
b=int(b)
if b==N:
  print(int(a))
  sys.exit()
elif int(c*1.08)==N:
  print(int(c))
elif int(d*1.08)==N:
  print(int(d))
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:
import math
N = int(input())
ans = math.ceil(N/1.08)
if math.floor(ans*1.08) == N:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
N_o = int(N/1.08)
if int(N_o * 1.08) == N:
    print(N_o)
else:
    if int((N_o+1)*1.08) == N:
        print(N_o+1)
    elif  int((N_o-1)*1.08) == N:
        print(N_o-1)
    else:
        print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
A = N // 1.08
A2 = A + 1

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for i in range(49999):
    if int(i*1.08) == N:
        ans = i

if ans:
    print(ans)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

a = math.floor(N / 1.08)
b = a + 1

aa = math.floor(a * 1.08)
bb = math.floor(b * 1.08)

if(aa == N):
    print(a)
else:
    if(bb == N):
        print(b)
    else:
        print(":(")

Submission status: Accepted

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

n = int(input())

def bin_search(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bin_search(n, 0, lambda x: (x * 1.08) >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    p = n * 25 // 27
    a, b = int(p * 1.08), int((p + 1) * 1.08)
    if a == n:
        print(p)
    elif b == n:
        print(p + 1)
    else:
        print(":(")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

i=1
while i<=N:
    if math.floor(i*1.08)==N:
        print(i)
        quit()
    i+=1
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
ans = n
while int(ans*1.08) > n:
    ans -= 1
if int(ans*1.08)==n:
    print(ans)
else:
    print(":(")

Submission status: Accepted

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

# In[39]:


N = int(input())


# In[40]:


for x in range(int(N * 10/11), N+1):
    if (x*1.08)//1 == N:
        print(x)
        break
else:
    print(":(")


# In[ ]:

Submission status: Accepted

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

a = math.floor(n / 1.08)
b = a + 1

aa = math.floor(a * 1.08)
bb = math.floor(b * 1.08)
if (aa == n):
    print(a)
else:
    if (bb == n):
        print(b)
    else:
        print(':(')

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

a = N/1.08
b = (N+1)/1.08

if b-math.ceil(a) <= 0:
    print(':(')
else:
    print(math.ceil(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

def bs(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(n, 0, lambda x: (x * 1.08) >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))


def mi():
    return map(int, input().split())


def ii():
    return int(input())


N = ii()

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())
import math
X = math.ceil(N/1.08)
if math.floor(X * 1.08) == N:
    print(X)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

if ans != 0:
    print(ans)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for i in range(1, N + 1):
    if int(i*1.08) == N:
        ans = i

if ans != 0:
    print(ans)
else:
    print(":(")

Submission status: Accepted

Solution code:
def resolve():
    import math
    N = int(input())
    price = N/1.08
    reTaxprice1 = math.floor(math.floor(price)*1.08)
    reTaxprice2 = math.floor(math.ceil(price)*1.08)
    if reTaxprice1 == N:
        print(math.floor(price))
    elif reTaxprice2 == N:
        print(math.ceil(price))
    else:
        print(':(')
resolve()

Submission status: Accepted

Solution code:
import math

N = int(input())

mini = N / 1.08
maxx = (N + 1) / 1.08
int_n = math.ceil(N / 1.08)


if (mini <= int_n and int_n < maxx):
    ans = int_n
else:
    ans = ':('

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=int(n/1.08)
aa=a-1
aaa=a+1
b=int(a*1.08)
bb=int(aa*1.08)
bbb=int(aaa*1.08)
A=[a,aa,aaa]
B=[b,bb,bbb]
f=0
for i in range(3):
  if B[i]==n:
    f=1
    ans=A[i]
    break
if f==0:
  print(":(")
else:
  print(ans)

Submission status: Accepted

Solution code:
import sys
n = int(input())
for i in range(1,n+1):
    if int(i*1.08) == n:
        print(i)
        sys.exit()

print(":(")

Submission status: Accepted

Solution code:
from math import ceil, floor

n = int(input())
res = ceil(n/1.08)
if floor(res*1.08) == n:
    print(res)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
X = int(N//1.08)+1

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().strip())
x1 = n // 1.08
x2 = n // 1.08 + 1

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

Submission status: Accepted

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


def solve(N: int):
    # X * 1.08 = N
    # X = N / 1.08

    for i in range(1, 50001):
        if N == math.floor(i * 1.08):
            print(i)
            return
    print(":(")


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
n = int(input())
limax = 46298

for i in range(limax+1):
    if int(i*1.08) == n:
        print(i)
        break
    elif i == limax:
        print(':(')
    else:
        pass

Submission status: Accepted

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

for x in range(X - 1, X + 2):
    if int(x * 1.08) == N:
        print(x)
        break
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
x = math.ceil(n/1.08)
if math.floor(x*1.08) == n: #1.08で割って元に戻した値を切り捨てした値が同じになる時
  print(x)
else:
  print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())

for i in range(1,47000):
    if math.floor(i*1.08) == n:
        print(i)
        quit()

print(':(')

Submission status: Accepted

Solution code:
import math
s=int(input())
n = math.ceil(s/1.08)


if math.floor(n*1.08)==s:
    print(n)
else:
    print(":(")

Submission status: Accepted

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

n = int(input())

def binary_search(n):
    ok = n
    ng = 0
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if (mid * 1.08) >= n:
            ok = mid
        else:
            ng = mid
    return ok

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

Submission status: Accepted

Solution code:
n = int(input())

import math

def cal():
    # https://qiita.com/drken/items/97e37dd6143e33a64c8c
    ok = n
    ng = 0
    # 隣接するまで繰り返す
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2

        if mid * 1.08 >= n:
            ok = mid
        else:
            ng = mid
    return ok


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

Submission status: Accepted

Solution code:
n = int(input())

import math

def cal():
    for i in range(n+1):
        if n == int(i * 1.08):
            return i
    return 0

ans = cal()
if ans:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

import math

def cal():
    for i in range(n+1):
        if n == math.floor(i * 1.08):
            return i
    return 0

ans = cal()
if ans:
    print(ans)
else:
    print(':(')

Submission status: Accepted

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

X_kari = math.ceil(N/1.08)
if int(X_kari * 1.08) == N:
  print(X_kari)
else: print(':(')

Submission status: Accepted

Solution code:
i = int(input())
x = i / 1.08
y = (i + 1) / 1.08
if x <= int(y) < y:
    print(int(y))
else:
    print(':(')

Submission status: Accepted

Solution code:
#解説AC
n = int(input())
for i in range(50001):
    if int(i*1.08) == n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
for i in range(50001):
    if int(i*1.08) == n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


# For taking integer inputs.
def inp():
    return(int(input()))


n = inp()
res = ":("
for i in range(1, n+1):
    temp = math.floor(i*1.08)
    if temp == n:
        res = i
print(res)

Submission status: Accepted

Solution code:
import math
from collections import deque
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return map(int, input().split())
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): # root
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): # much time
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} # 1~n
def bitArr(n):#ビット全探索
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): #j:aの個数
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

n = readInt()
x = int(n/1.08)
ans = [x-1,x,x+1]

for i in range(3):
	if int(ans[i]*1.08)==n:
		print(ans[i])
		exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

ret = ':('
for i in range(50000):
    if N == math.floor(i * 1.08):
        ret = i

print(ret)

Submission status: Accepted

Solution code:
a=int(input())
if a%1.08==0:
    print(int(a/1.08))
else:
    ans=[0]*3
    ans[0]=int(a/1.08)-1
    ans[1]=int(a/1.08)
    ans[2]=int(a/1.08)+1
    for i in range(4):
        if i==3:
            print(':(')
            break
        if int(ans[i]*1.08)==a:
            print(ans[i])
            break

Submission status: Accepted

Solution code:
import math
n = int(input())
for i in range(1,50000):
  if math.floor(i * 1.08) == n:
    print(i)
    exit()
print(':(')

Submission status: Accepted

Solution code:
N = int(input())

est_X = int(N/1.08)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
flag = 0
for i in range(1,N+1):
    if math.floor(i*1.08) == N:
        print(i)
        flag = 1
        break

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

Submission status: Accepted

Solution code:
import sys
import math
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

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

Submission status: Accepted

Solution code:
import math

def resolve():
    N = int(input())
    if (N + 1) * 100 % 135 == 0 or (N + 0.5) * 100 % 135 == 0 :
        print(":(")
    else:
        print(math.ceil(N/1.08))
resolve()

Submission status: Accepted

Solution code:
import math

N = int(input())
t = False
for i in range(N * 100, (N + 1) * 100):
    if i % 108 == 0:
        t = True
        break
if t:
    print(math.ceil(N / 1.08))
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = N //1.08
y = x + 1

if (math.floor(x * 1.08) == N):
    print(int(x))
elif(math.floor(y * 1.08) == N):
    print(int(y))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

low = N // 1.08

while True:
    if math.floor(low * 1.08) == N:
        print(int(low))
        break
    elif math.floor(low * 1.08) > N:
        print(':(')
        break
    low += 1

Submission status: Accepted

Solution code:
n=int(input())
for i in range(n+1):
    if int(i*1.08) == 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
    elif int(i*1.08) > N:
        print(":(")
        break

Submission status: Accepted

Solution code:
n = int(input())

for i in range(0,n+1):
  if(int(i*1.08) == n):
    print(i)
    exit()
  else:
    continue
print(":(")

Submission status: Accepted

Solution code:
n = int(input())

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

print(':(')

Submission status: Accepted

Solution code:
N = int(input())

if N * 100 % 108 == 0:
    print(int(N / 1.08))
else:
    if int(N // 1.08 * 1.08) == N:
        print(int(N / 1.08))
    elif int((N // 1.08 + 1) * 1.08) == N:
        print(int(N / 1.08) + 1)
    else:
        print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
count = 0
for i in range(1,50000):
    if math.floor(i*1.08) == n :
        print(i)
        count+=1
        break;


if count == 0 :
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

X_f = math.floor(N/1.08)
X_c = math.ceil(N/1.08)

if math.floor(X_f * 1.08) == N:
    print(X_f)
elif math.floor(X_c * 1.08) == N:
    print(X_c)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
X = N//1.08-1
while True:
    a = int(X*1.08)
    if a == N:
        print(int(X))
        exit()
    elif a < N:
        X += 1
    else:
        print(':(')
        exit()

Submission status: Accepted

Solution code:
#方法２
import math
n = int(input())

if math.floor(math.ceil(n/1.08) * 1.08) == n:
    print(math.ceil(n/1.08))
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
import math
n = int(input())
f = 1

for i in range(int(n/1.08)-10,int(n//1.08)+12):
    if math.floor(i * 1.08) == n:
        print(i)
        f = 0
        sys.exit()
        
if f == 1:
    print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())
X = math.ceil(n / 1.08)

if math.floor(X * 1.08) == n:
	print(X)
else:
	print(":(")

Submission status: Accepted

Solution code:
import math
A = [math.floor(i*1.08) for i in range(1, 50001)]
X = int(input())
flag = 0
for i in range(50000):
  if X == A[i]:
    print(i+1)
    flag = 1
    break
if flag == 0:
  print(":(")

Submission status: Accepted

Solution code:
t = int(input())
for n in range(50001):
    if int(n*1.08) == t:
        print(n)
        exit()
print(":(")

Submission status: Accepted

Solution code:
import math, sys
N = int(input())
p = [int(N/1.08), math.ceil(N/1.08)]

for n in p:
    if int(n*1.08)==N:
        print(n)
        sys.exit()

print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

X = math.ceil(N / 1.08)

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

Submission status: Accepted

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

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