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:
n=int(input())
if (n+1)//1.08 != n//1.08:
  res = int((n+1.08)//1.08)
  print(res)
else:
  print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())

price = n / 1.08

if int(math.ceil(price) * 1.08) == n:
	print(math.ceil(price))
elif int(math.floor(price) * 1.08) == n:
	print(math.floor(price))
else:
	print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


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

print(':(')

Submission status: Accepted

Solution code:
import math
n=int(input())
r1=math.ceil(n/1.08)
r2=(n+1)/1.08
if r1<r2:
    print(r1)
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(0)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(50000):
  if math.floor(i*1.08) == n:
    print(i)
    exit()
    
print(":(")

Submission status: Accepted

Solution code:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    n = I()
    dic = collections.defaultdict(lambda : ":(")
    for i in range(1,46300):
        tax = i*108//100
        dic[tax] = i
    print(dic[n])
main()

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())

N = I()
for i in range(50000):
    if i*27//25 == N:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n=int(input())

num=math.ceil(n/1.08)

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

Submission status: Accepted

Solution code:
N = int(input())

for X in range(N//2, N+1):
  n = (X*108)//100
  if n==N:
    print(X)
    break
  elif n > N:
    print(":(")
    break

Submission status: Accepted

Solution code:
import math
n = int(input())
for i in range(50000):
  if math.floor(i*1.08)==n:
    print(i)
    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:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
for i in range(10**6+1):
    if (i * 108) // 100 == n:
        print(i)
        quit()
print(":(")

Submission status: Accepted

Solution code:
# Input the amount of money Takahashi paid
N = int(input())

# Check if the price before tax is X, for X = 1, 2, 3, ..., N
ans = -1
for i in range(1, N + 1):
	if int(i * 1.08) == N:
		ans = i

# Print answer
if ans != -1:
	print(ans)
else:
	print(":(")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()


def solve():
    n = ini()
    for x in range(n + 1):
        y = int(x * 1.08 + 1e-8)
        if y == n:
            return x
    return ":("


print(solve())

Submission status: Accepted

Solution code:
n=int(input())
ans=[]
for i in range(55000):
  if int(i*1.08)==n:
    ans.append(i)
if ans==[]:
  print(':(')
else:
  print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
price = int(input())
tax = 8
price_1 = math.ceil(price / (1 + tax / 100))
price_2 = math.floor(price_1 * tax / 100)
print(price_1 if price == price_1 + price_2 else ':(')

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

tmp = int(n/1.08)
ans_lists = [tmp + i for i in range(2)]
ans = 0
for j in ans_lists:
    if int(j*1.08) == n:
        ans = j
        break
    else:
        ans = ':('

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
res=0

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

Submission status: Accepted

Solution code:
import math

n = int(input())

x = n/1.08
t1 = math.ceil(x)
t2 = math.floor(x)

if math.floor(t1 * 1.08) == n:
    print(t1)
elif math.floor(t2*1.08) == n:
    print(t2)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil, floor

def resolve():
  N = int(input())
  tax = 0.08

  if floor(ceil(N/(1+tax))*(1+tax)) == N:
    print(ceil(N/(1+tax)))
  else:
    print(":(")

if __name__ == "__main__":
  resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = int(N / 1.08) # min
b = int((N + 1)  / 1.08) # max
ans = ':('
for i in range(a, b + 1):
    if int(i * 1.08) == N:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

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

if __name__=='__main__':
    n = I()
    solve()

Submission status: Accepted

Solution code:
import math
N=int(input())
if (N/1.08).is_integer()==True:
    S=int(N/1.08)
else:
    S=math.ceil(N/1.08)
if (S*1.08)//1==N:
    print(S)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1, 50000):
    pay = int(i*1.08)
    if pay == N:
        print(i)
        break
    elif pay > N:
        print(':(')
        break

Submission status: Accepted

Solution code:
price = int(input())

prime_cost = int(price / 1.08)

if (prime_cost * 1.08)//1 == price:
      print(prime_cost)
elif ((prime_cost + 1) * 1.08)//1 == price:
      print(prime_cost + 1)
else:
      print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = -1
for k in range(n, 0, -1):
    if n == k * 108 // 100:
        ans = k
        break
if ans > 0: print(ans)
else: print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
x = n/1.08
x1, x2 = math.floor( x ), math.ceil( x )

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

N = int(input())
for x in range(1, N + 1):
    val = x * 108
    val -= val % 100
    if val == N * 100:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
flag = True
for i in range(N):
  x = math.floor((i+1)*1.08)
  if (x == N):
    print(i+1)
    flag = False
    break
if (flag):
  print(':(')

Submission status: Accepted

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

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
def taxr(n):
	x = math.ceil(n / 1.08)
	if int(x * 1.08) == n:
		return x
	else:
		return ':('
n = int(input())
print(taxr(n))

Submission status: Accepted

Solution code:
import math


def resolve():
    import sys
    input = sys.stdin.readline
    row1 = [int(x) for x in input().rstrip().split(" ")]
    s = row1[0]

    x = int(s / 1.08)

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



if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
X_low = N // 1.08
X_high = int(X_low + 1)

if np.floor(X_low * 1.08) == N:
    print(X_low)
elif np.floor(X_high * 1.08) == N:
    print(X_high)
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
n = int(input())
for i in range(1, 46300):
    if n*25/27 <= i < (n+1)*25/27:
        print(i)
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
import math
import sys
n = int(input())
found = False

if(n <= 12):
    print(n)
    sys.exit()

for y in range(n):
    if n == math.floor(y*1.08):
        print(y)
        found = True
        break
if (found == False):
    print(":(")

Submission status: Accepted

Solution code:
#B - Tax Rate 
import math
N = int(input())

result = ':('
for i in range(1,N+1):#+1しないとi=Nの時(1,2,3,4,5,6,7,8,9,10,11,12)が入らない
    if math.floor(i * 1.08) == N:#小数点以下切り捨て
        result = i
print(result)

Submission status: Accepted

Solution code:
N = int(input())

N_1 = round(N/1.08//1)
N_2 = N_1 + 1


if N_1*1.08//1 == N:
    print(N_1)

elif N_2 * 1.08//1 == N:
    print(N_2)

else:
    print(":(")

Submission status: Accepted

Solution code:
import math


def solve():
    N = int(input())
    if math.floor(math.ceil(N / 1.08) * 1.08) == N:
        print(math.ceil(N / 1.08))
    else:
        print(':(')


if __name__ == "__main__":
    solve()

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 n == int(ans * 1.08):
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
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:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()

if int(-(-n//1.08) * 1.08) != n:
    print(":(")
else:
    print(int(-(-n//1.08)))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

if ans != -1:
	print(ans)
else:
	print(":(")

Submission status: Accepted

Solution code:
import math
num1 = int(input())
num2 = math.floor(num1 / 1.08)
num3 = math.ceil(num1 / 1.08)
end = False
if math.floor(math.floor(num1 / 1.08) * 1.08) == num1:
  print(math.floor(num1 / 1.08))
  end = True
elif math.floor(math.ceil(num1 / 1.08) * 1.08) == num1 and end == False:
  print(math.ceil(num1 / 1.08))
else:
  print(':(')

Submission status: Accepted

Solution code:
n=int(input())
m=int(n/1.08)
for i in range(-2,3):
    if int((m+i)*1.08)==n:
        print(m+i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


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


def z():
    return int(sys.stdin.readline())


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


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


N = z()
min_ = int((N//1.08)-1)
for v in range(min_, min_+100):
    if (int(v * 1.08) == N):
        print(v)
        exit()

print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

X = N/1.08

if (X % 1 == 0):
  print(int(X))
elif (math.floor(math.ceil(X) * 1.08) == N):
  print(math.ceil(X))
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

n = N / (1.08)

n0 = math.floor(n) - 1
n1 = math.floor(n)
n2 = math.ceil(n)

if int(n0 * 1.08) == N:
    print(n0)
elif int(n1 * 1.08) == N:
    print(n1)
elif int(n2 * 1.08) == N:
    print(n2)
else:
    print(":(")

Submission status: Accepted

Solution code:
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
from decimal import *
n=I()
x=Decimal("1.08")
for i in range(1,100000):
    if int(i*x)==n:
        print(i)
        sys.exit()
print(":(")

Submission status: Accepted

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

if __name__ == "__main__":
    main2()

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
for i in range(1,50001):
    if i*108//100 == n:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
tax_min = int(N*0.08/1.08)
tax_max = int((N+1)*0.08/1.08)
if tax_min != tax_max:
    print(":(")
else: print(N - tax_min)

Submission status: Accepted

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

# from numba import njit

# from collections import Counter
# from itertools import accumulate
# import numpy as np
# from heapq import heappop,heappush
# from bisect import bisect_left

# @njit
def solve(n):
  for x in range(50000):
    if x * 108 // 100 == n:
      return x
  return ":("



def main():
  N = int(input())
  # N,M = map(int,input().split())
  # a = list(map(int,input().split()))
  print(solve(N))
  return

if __name__ == '__main__':
  main()

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)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
quo = int(n/1.08)
temp = 0
while temp<= n:
  temp = int(quo*1.08)
  if temp == n:
    print(quo)
    break
  quo = quo+1
if temp > n:
  print(':(')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
flag = True
for i in range(100000):
  if int(i * 1.08) == N:
    print(i)
    flag = False
    break
if flag:
  print(":(")

Submission status: Accepted

Solution code:
n = int(input())
found = False

for i in range(1, n + 1):
    x = int ( i * 1.08 )
    if x == n :
        print(i)
        found = True
        break

if not found:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
for i in range(100000):
    if i * 108 // 100 == n:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
from math import ceil
N = int(input())
X = ceil(N / 1.08)
if int(X * 1.08) == N:
    print(int(X))
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
n =int(N//1.1) 
while n<=N:
    if int(n*1.08)==N:
        print(n)
        exit()
    n+=1


print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力　　２０２０－０７２７　21：50
import math
import sys
input = sys.stdin.readline  #文字列では使わない
N = int(input())
ans =":("
for i in range(1,50001):
    a =int( i *1.08 )
    if a==N:
        ans =i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for x in range(1, 50001):
    if floor(x * 1.08) == N:
        print(x)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

res = -1
for x in range(1, n+1):
  if int(x * 1.08) == n:
    res = x

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    n = int(readline().rstrip())

    for i in range(50001):
        k = math.floor(i * 1.08)
        if n == k:
            print(i)
            return
    print(':(')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
if n%1.08==0:
  print(int(n//1.08))
else:
  x_init=n//1.08 + 1
  x_n = int(1.08*x_init)
  if x_n ==n:
    print(int(x_init))
  else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy

N = int(input())
X0 = N / 1.08
X1 = (N + 1) / 1.08

if numpy.ceil(X1) - numpy.ceil(X0) == 0:
    print(':(')
else:
    print(int(numpy.ceil(X0)))

Submission status: Accepted

Solution code:
N = int(input())

for x in range(50001):
  y = int( x * 1.08 )
  if y == N:
    print(x)
    exit()
    
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x = int(input())
for i in range(50000):
    if int(i * 1.08) == x:
        print(i)
        quit()
print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
A = N/1.08 
B = (N+1)/1.08 

if math.ceil(N/1.08) < math.ceil((N+1)/1.08 ):
  print(math.ceil(N/1.08))
else:
  print(':(')

Submission status: Accepted

Solution code:
n =int(input())
b = False
for i in range(int(n//1.08-1), int(n//1.08+4),1):
    if n == int(i*1.08):
        b = True
        break

if b == True:
    print(i)
else:
    print(':(')

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

from math import floor

n=ni()

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

Submission status: Accepted

Solution code:
n = int(input())
ans = int(n / 1.08)
if int(ans * 1.08) != n:
  ans = int(n / 1.08) + 1
  if (int(ans * 1.08)) != n:
    ans = ':('
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

resultA = N * 100 // 108
resultB = resultA + 1
valueA = resultA * 108 // 100
valueB = resultB * 108 // 100

if N == valueA:
  print(resultA)
elif N == valueB:
  print(resultB)
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())
for i in range(46298):
  if int(i*1.08)==n:
    print(i)
    break
else:
  print(":(")

Submission status: Accepted

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

n = int(input())
x = {}

for i in range(1, 50001):
    x.setdefault(math.floor(i * 1.08), i)


try:
    print(x[n])
except:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

fl = math.floor(N / 1.08)
cl = math.ceil(N / 1.08)

if math.floor(fl * 1.08) == N:
    print(fl)
elif math.floor(cl * 1.08) == N:
    print(cl)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = int(N / 10)
x = 0

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

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

Submission status: Accepted

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

import math

N = int(input())

X = N / 1.08
# X = Decimal(str(X)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)

X = int(math.ceil(X))

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

Submission status: Accepted

Solution code:
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n = int(input())
    for i in range(1,n+1):
        u = 108*i//100
        if u == n:
            print(i)
            break
        elif u > n:
            print(':(')
            break


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
#m1,d1=map(int,input().split())
#hl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
import math
flag=':('
for x in range(1,n+1):
    price=math.floor(x*1.08)
    if math.floor(x*1.08) == n:
        flag=x
        break
print(flag)

Submission status: Accepted

Solution code:

n = int(input())

for i in range(500000):
  if int(i*1.08) == n:
    print(i)
    break
else:
  print(":(")

Submission status: Accepted

Solution code:
N = int(input())

ans = (N * 100 + 99) // 108

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

rate = 1.08
r = int(N / 1.08)
res = ":("
for i in range(r, r+3):
  if(int(i * rate) == N):
    res = str(i)
    break

print(res)

Submission status: Accepted

Solution code:
import math

N = int(input())

lower = N / 1.08

vl = math.ceil(lower)

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

Submission status: Accepted

Solution code:
n=int(input())

for x in range(55000):
    if int(x*1.08)==n:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
ans = n*100/108
for i in [int(ans), int(ans)+1]:
    if int(i*1.08) == n:
        print(i)
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())

for v in range(int(n//1.08)+2):
    if int(v*1.08) == n:
        print(v)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math
N=int(input())
l=N*100/108
r=(N+1)*100/108
for i in range(math.ceil(l),math.ceil(r)):
    print(i);exit()
print(":(")

Submission status: Accepted

Solution code:
import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

N = int(input())
ls = [0] * 50505
for i in range(len(ls)):
	ls[i] = int(i * 1.08)
for i in range(N, 0, -1):
	if ls[i] == N:
		print(i)
		sys.exit()
print(':(')

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(i*1.08) for i in range(1, 46298)]
n = int(input())
if(n in a):
  print(a.index(n)+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
# B - Tax Rate
ans = ':('
N = int(input())
for X in range(1,50000):
    tmp = int(X*1.08+0.000001)
    if tmp==N:
        ans = X
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

x = int(N * 100 / 108)

if x * 108 // 100 == N:
  print(x)
elif (x+1) * 108 // 100 == N:
  print(x+1)
else:
  print(':(')

Submission status: Accepted

Solution code:
N = int(input())
if (N*100)%108 == 0 :
    print(int(N/1.08))
else :
    for i in range(1,100) :
        if (N*100+i) % 108 == 0 :
            print(int((N*100+i)/108))
            break
    else :
        print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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