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 math
import sys
n = int(input())
end = int(n / 1.08) + 1

for i in reversed(range(end-2, end+1)):
    x = math.floor(i * 1.08)
    if x == n:
        print(i)
        sys.exit()

print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline
N = int(input())
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 
price = math.ceil((N/1.08))
#print(price)
#print(math.floor(price*1.08))
if N == (math.floor(price*1.08)):
    print(price)
else:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math,sys
N=int(input())
min=math.ceil(N/1.08)
max=math.ceil((N+1)/1.08-10**-9)
if min>=max:
  print(":(")
  sys.exit()
print(min)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for x in range(1,50000):
    y = int(x*1.08)
    if y == n:
        ans = x
        break
if ans == 0:
    print(':(')
else:
    print(x)

Submission status: Accepted

Solution code:
N=int(input())
a=N/1.08
b=(N+1)/1.08
for i in range(50001):
  if a <= i < b:
    print(i)
    exit()
print(':(')

Submission status: Accepted

Solution code:
N = int(input())
X = int(N / 1.08)
flag = False
if int(X*1.08) == N:
    flag = True
    ans = X
elif int((X+1)*1.08) == N:
    flag = True
    ans = X + 1
if flag:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math


N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

ans = round(N / 1.08)
b = N / 1.08 - int(N / 1.08)
if b < 0.08 / 1.08 and 0 < b:
    print(":(")
else:
    if not int(ans*1.08) == N:
        print(ans + 1)
    else:
        print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
X = N / 1.08
X = int(X)
X2 = X - 1
X3 = X + 1
#print(X)
#print(math.floor(X * 1.08))
#print(math.floor(X2 * 1.08))
#print(math.floor(X3 * 1.08))
#print(X == int(X))
if N == math.floor(X * 1.08):
    print(int(X))
elif N == math.floor(X2 * 1.08):
    print(int(X2))
elif N == math.floor(X3 * 1.08):
    print(int(X3))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

for x in range(1, 50000):
  test = math.floor(x * 1.08)
  if test == N:
    print(x)
    exit()
  if test > N or test == 50000:
    print(':(')
    exit()

Submission status: Accepted

Solution code:
n = int(input())

cand = int(n/1.08)
flag = 0

for i in range(100):
  if int((cand-50+i)*1.08) == n:
    print(cand-50+i)
    flag = 1
    break

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

Submission status: Accepted

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


def main():
    sc = Scan()
    N = sc.intarr()[0]
    for i in range(50000):
        inTax = int(i * 1.08)
        if inTax < N:
            continue
        elif inTax == N:
            print(i)
            return
        elif inTax > N:
            print(":(")
            return


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	N = inputInt()

	ans = -(-N // 1.08)
	ans2 = N / 1.08

	#print(ans2)

	if ans2.is_integer():
		print(int(ans))
	else:
		tmp = ans2 - int(ans2)
		if tmp < 0.1:
			print(":(")
		else:
			print(int(ans))







if __name__ == "__main__":
	main()

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
n = int(input())

moto = n//1.08

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

Submission status: Accepted

Solution code:
def main():

    n = int(input())

    ans = n / 1.08

    ans_int = int(ans)
    #print(ans_int)

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




if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a = int(input())
for x in range(10**5 + 100):
    if int(x*1.08) == a:
        print(x)
        sys.exit()
print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
for i in range(n+1):
    if n <= i * 1.08 < n+1:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math
N=int(input())
X1=math.ceil(N/1.08)
X2=math.floor(N/1.08)
if N==math.floor(X1*1.08):
    print(X1)
    exit(0)
if N==math.floor(X2*1.08):
    print(X2)
    exit(0)
print(":(")

Submission status: Accepted

Solution code:
n=int(input())
x=n/1.08
int_x=int(x)
if x-int_x==0:
    print(int_x)
else:
    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:
from math import ceil

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

Submission status: Accepted

Solution code:
n = int(input())
tax = 1.08
tmp = int(n/tax)
ret1 = int(tmp*tax)
ret2 = int((tmp+1)*tax)

if ret1 == n:
    print(tmp)
elif ret2 == n:
    print(tmp+1)
else:
    print(':(')

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

N = int(input())

for i in range(N+1):
    M = i*1.08
    if N == int(M):
        print(i)
        sys.exit()
print(":(")
sys.exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

if (N * 100) % 108 == 0:
    print(int(N / 1.08))
    exit()

M = int(N / 1.08) + 1
A = int(M * 1.08)

if A == N:
    print(int(M))
else:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
t = 1.08
ans = 0
for i in range(1,n+1):
    res = int(i*t)
    if res == n:
        ans = i
if ans == 0:
    print(':(')
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
base = math.floor(n/1.08)
for i in [-1, 0, 1]:
    moto = base+i
    if math.floor(moto*1.08) == n:
        print(moto)
        exit()
print(':(')

Submission status: Accepted

Solution code:
N = int(input())
X = N * 100 // 108
if N * 100 % 108 != 0:
    X += 1
if X * 108 // 100 == N:
    print(X)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

X = int(N/1.08)

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

Submission status: Accepted

Solution code:
import math

N = int(input())

n = math.ceil(N/1.08)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=-1
for i in range(n+100):
  if int(i*1.08)==n:
    ans=i
    break
print(":(" if ans==-1 else ans)

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:
inf = float("inf")

n = int(input())

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    n = int(readline())
    x1 = n//1.08
    x2 = x1+1
    if (x1*1.08)//1==n:
        print(int(x1))
    elif (x2*1.08)//1==n:
        print(int(x2))
    else:
        print(":(")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

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


if flag:
    print(i)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
p=int(n/1.08)
#print(p)
x=int(p*1.08)
#print("x",x)
flag=0
if x==n:
  flag=1
  print(p)
if flag==0 and x<n:
  if int((p+1)*1.08)==n:
    print(p+1)
    flag=1
if flag==0 and x>n:
  if int((p-1)*1.08)==n:
    print(p-1)
if flag==0:
  print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

if n/1.08==int(n/1.08):
    print(int(n/1.08))

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

Submission status: Accepted

Solution code:
import math

n = int(input())
a = math.floor(n/1.08)
b = math.ceil(n/1.08)
if math.floor(a*1.08) == n:
  print(a)
elif math.floor(b*1.08) == n:
  print(b)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

def hukano():
    print(":(")
def zeikomi(n):
    return n*1.08//1

N_min=N*9//10

k=N_min
while True:
    teika=int(zeikomi(k))
    if int(teika)==N:
        print(k)
        break
    elif teika<N:
        k=k+1
    else:
        hukano()
        break

Submission status: Accepted

Solution code:
A= int(input())

nuki=A/1.08
kamo=int(nuki)+1
if int(kamo*1.08) == A:
    print(kamo)
elif int(int(nuki)*1.08) == A:
    print(int(nuki))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

p = int(input())


ans = math.ceil(p/(1.08))
con = math.floor(ans*1.08)
#print("ans:{} {}".format(ans, con))
if p == con:
	print(ans)
else:
	print(":(")

Submission status: Accepted

Solution code:
N=int(input())
flg=-1

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

if flg==-1:
	print(":(")
else:
	print(flg)

Submission status: Accepted

Solution code:
n = int(input())
if n % 27 == 13 or n % 27 == 26:
    print(':(')
elif n % 27 == 0:
    print(int(n / 1.08))
else:
    print(int(n / 1.08) + 1)

Submission status: Accepted

Solution code:
import math

n = int(input())

v = math.floor(math.ceil(n / 1.08) * 1.08)

if (v == n):
    print(math.ceil(n / 1.08))
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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


def solve(N: int):
    X=int(N/1.08)
    for X in range(X, X+50000):
        if int(X*1.08)==N:
            print(X)
            return
        if X*1.08>N:
            print(":(")
            return


# Generated by 1.1.6 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:
#B
N=int(input())
X=int(N/1.08)
if int((X+1)*1.08)==N:
  X +=1
print(X if int(X*1.08)==N else ':(')

Submission status: Accepted

Solution code:
k = [0] * 50001
for i in range(50001):
    k[i] = int(i*1.08)

n = int(input())
if n in k:
    for j in range(50001):
        if k[j] == n:
            print(j)
            break
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
a = int(N / 1.08)
b = int(a * 1.08)
c = int((a + 1) * 1.08)

if N == b:
    print(a)
elif N == c:
    print(a + 1)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = input()
N = int(N)

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

X = math.floor(nuki * 1.08)

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

Submission status: Accepted

Solution code:
n=int(input())
memo=[]
for i in range(1,n+1):
  memo.append(int(i*1.08))

if n in memo:
  print(memo.index(n)+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
from math import ceil
n = int(input())
m = ceil(n/1.08)

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

Submission status: Accepted

Solution code:
n=int(input())
kari=int((n/108)*100)
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:
#!/usr/bin/env python
import sys

def _i(): return int(sys.stdin.readline().strip())

n = _i()

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 = False
count = 0
for i in range(50000):
    count = i
    i = i * 1.08
    i = int(i)
    if i == N:
        Flag = True
        break
    
if Flag == True:
    print(count)

else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(1, 50401):
    l.append(int(i*1.08))
if n in l:
    if n/108*100 % 1 == 0:
        print(int(n/108*100))
    else:
        print(int(n/108*100)+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
N = float(input())
Nc = math.ceil(N / 1.08)
Nf = math.floor(N / 1.08)
if int(Nc * 1.08) == N:
  print(Nc)
elif int(Nf * 1.08) == N:
  print(Nf)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

orgin=int(1+n//1.08)
orgintax= int(orgin*1.08)

if orgintax==n:
  print(orgin)
else:
  print(':(')

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f():
    n = int(input())
    a = n/1.08
    if a == int(a):
        print(int(a))
        return
    x = int(a) + 1
    if x >= ((n+1)/1.08):
        print(':(')
    else:
        print(x)

f()

Submission status: Accepted

Solution code:
n = int(input())

if (n+1)/1.08-n/1.08>=1:
    print(int(n/1.08))
elif n/1.08==int(n/1.08) or int(n/1.08+1)<(n+1)/1.08:
    print(int((n+1)/1.08))
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
for i in range(50001):
    if int(i*1.08)==n:
        print(i)
        break
    if i==50000:
        print(':(')
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
if(n%1.08==0):
    print(int(n/1.08))
else:
    x=n/1.08
    n_low=int(math.floor(1.08*math.floor(x)))
    n_high=int(math.floor(1.08*math.ceil(x)))
    if(n==n_low):
        print(int(math.floor(x)))
    elif(n==n_high):
        print(int(math.ceil(x)))
    else:
        print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
r = 1.08
num = int(n/r)
#print(num)
small = int(num*r)
large = int((num + 1) *r)
#print(small,large)

if(n == small):
  print(num)
elif(n == large):
  print(num + 1)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(zeikomi: int):
    for zeinuki in range(zeikomi + 1):
        if int(zeinuki * 1.08) == zeikomi:
            return zeinuki
    return None


zeikomi = int(input().strip())
zeinuki = solve(zeikomi)
if zeinuki is not None:
    print(zeinuki)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

x = math.ceil(N / 1.08)

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

Submission status: Accepted

Solution code:

N = int(input())

X = int(N/1.08)


#print("x= "+str(X))
#print(int((X+1)*1.08))


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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(N+1):
    x = i * 108 // 100
    if x == N:
        print(i)
        exit()

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

answer = N // 1.08

if int(answer*1.08) == N:
    print(int(answer))
else:
    if int((answer+1)*1.08) == N:
        print(int(answer+1))
    else:
        print(":(")

Submission status: Accepted

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

X = N/1.08
X = math.floor(X)
flag = True
for i in range(14):
    if N == math.floor((X+i)*1.08):
        print(X+i)
        flag = False
        break
if flag:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

Submission status: Accepted

Solution code:
def main():
    # map(int, input().split())
    # l = list(map(int, input().split()))
    N = int(input())
    X = int(N / 1.08)
    flag = False
    for i in [X-1, X, X+1]:
        if int(i*1.08) == N:
            flag = True
            print(i)
            break
    if not flag:
        print(':(')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 2019 12/01
# B Tax Rate

import math

N = int(input())

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

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:
import math

n=int(input())

n_lst=[]
x_lst=[]
for i in range(1,50000):
    n_lst.append(i)
    x_lst.append(math.floor(i*1.08))

if n in x_lst:
    print(n_lst[x_lst.index(n)])
else:
    print(':(')

Submission status: Accepted

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

tmp = n//1.08
# print(tmp)
if math.floor(tmp * 1.08) == n:
    print(int(tmp))
elif math.floor((tmp+1) * 1.08) == n:
    print(int(tmp + 1))
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
a = N/1.08
b = int(a)
while(True):
    c = int(b*1.08)
    if c==N:
        print(b)
        exit(0)
    if c>N:
        break
    b+=1
print(':(')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = int(input())
    ans = 0
    for i in range (50001):
        j = int(i* 1.08)
        if j == a:
            ans = i
            break
        if i == 50000:
            ans = ':('
    print(ans)

Submission status: Accepted

Solution code:
n= int(input())
if n%27==26 or n%27==13:
    print(":(")
else:
    print(int((n+1)/1.08))

Submission status: Accepted

Solution code:
n = int(input())
x = int(n / 1.08)
if n == int(x * 1.08):
    print(x)
elif n == int((x + 1) * 1.08):
    print(x + 1)
elif n == int((x - 1) * 1.08):
    print(x - 1)
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:
    print(x)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

ans = None
for y in range(1, 50001):
    if int(y * 1.08) == n:
        ans = y
        break

if ans is None:
    print(':(')
else:
    print(y)

Submission status: Accepted

Solution code:
import math
def resolve():
    n = int(input())
    if float.is_integer(n/1.08):
        print(int(n/1.08))
        return None
    ans = math.floor(n/1.08)+1
    if ans < (n+1)/1.08:
        print(int(ans))
    else:
        print(":(")  
resolve()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n0 = int(input())
n = n0+0.99
ans = int(n/1.08)
#print(n/1.08)

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

Submission status: Accepted

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

ans = 0

for x in range(50000):
	if math.floor(x * 1.08) == N:
		flg = 1
		ans = x
		break
	elif math.floor(x * 1.08) > N:
		break
		
if flg:
	print(ans)
else:
	print(":(")

Submission status: Accepted

Solution code:
N = int(input())
t = N / 1.08
k = int(abs(t))
if k * 1.08 - N < 1 and k * 1.08 - N >= 0:
  print(k)
elif (k+1) * 1.08 - N < 1 and (k+1) * 1.08 - N >= 0:
  print(k+1)
else:
  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:
import math
n = int(input())
min_n = int(n // 1.08)
max_n = math.ceil(n / 1.08)

for x in range(min_n, max_n+1):
    if math.floor(x * 1.08) == n:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
import math
n = float(input())
ans = n / 1.08
ansu = math.ceil(ans)
ansd = math.floor(ans)
if math.floor(ansu * 1.08) == n:
    print(ansu)
elif math.floor(ansd * 1.08) == n:
    print(ansd)
else:
    print(":(")

Submission status: Accepted

Solution code:
from math import ceil

N = int(input())
R = 1.08

ans_extax = ceil(N / R)
ans_intax = int(ans_extax * R)

if ans_intax == N:
    print(ans_extax)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(raw_input())
r = 1.08

candidate = int(N/r)

flag = False
max_value = 0
for i in range(-50, 50):
    value = int((candidate + i)*r)
    if value == N:
        if candidate+i > max_value:
            max_value = candidate+i
        flag = True


if flag == True:
    print max_value
else:
    print ":("

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
from math import ceil
N = int(input())
X = int(ceil(N * 100 / 108))
M = X * 108 // 100
if M == N:
    print(X)
else:
    print(':(')

Submission status: Accepted

Solution code:
N=int(input())
X=int(N/1.08)
import math
if math.floor(X*1.08)==N:
  print(X)
  exit()
elif math.floor(X*1.08)<N:
  while math.floor(X*1.08)<N:
    X+=1
else:
  while math.floor(X*1.08)>N:
    X-=1
if math.floor(X*1.08)==N:
  print(X)
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import math
tax = 1.08
def print_ans(N):
    """Test Case
    >>> print_ans(432)
    400
    >>> print_ans(1079)
    :(
    >>> print_ans(1001)
    927
    """
    X = int(N // tax)
    if N == math.floor(X * tax):
        print(X)
    elif N == math.floor((X + 1) * tax):
        print(X + 1)
    else:
        print(":(")
    
if __name__ == '__main__':
    N = int(input().rstrip())
    print_ans(N)

Submission status: Accepted

Solution code:
from math import floor


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

Submission status: Accepted

Solution code:
import math

n = int(input())
s = n / 1.08
u = math.floor(s)
l = math.ceil(s)
if math.floor(u * 1.08) == n:
    print(u)
    exit()
elif math.floor(l * 1.08) == n:
    print(l)
    exit()
else:
    print(":(")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math
def main():
    N = int(input())
    tax = 1.08
    price_base = math.floor(N/tax)

    if math.floor((price_base)*tax) == N:
        print(price_base)
        return

    if math.floor((price_base+1)*tax) == N:
        print(price_base+1)
        return
    
    if math.floor((price_base-1)*tax) == N:
        print(price_base-1)
        return
    
    print(':(')
    


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=n//1.08
from math import floor as f
p=[a,a-1,a+1,a-2,a+2]
c=[]
for i in p:
    if f(i*1.08)==n:
         c.append(i)
if len(c)==0:
    print(":(")
else:
    print(int(c[0]))