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

ans = int(n / 1.08)
start_search = ans - 500
end_search = ans + 500

for i in range(start_search, end_search):
    a = int(i * 1.08)
    if a == n:
        print(i)
        exit()

print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
k = 0
for i in range(N+1):
    if N<=i*1.08<N+1:
        print(int(i))
        ans += 1
        break
if ans == 0:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input()) * 25
r = (n + 24)//27
print((r, ':(')[r * 27 < n])

Submission status: Accepted

Solution code:
import math

n = int(input())

x = n / float(1.08)
chk = x - int(x)
if chk > 0:
    tmp = int(x) + 1
    if math.floor(tmp * 1.08) == n:
        print(tmp)
    else:
        print(':(')
else:
    print(int(x))

Submission status: Accepted

Solution code:
from decimal import Decimal
n=int(input())
ans=':('
for i in range(1,n+1):
  k=i*1.08
  if Decimal(k)//1==n:
    ans=i
    break
print(ans)

Submission status: Accepted

Solution code:
N= int(input())
X1 = N / 1.08
X = int(X1)
N_calc = int(X*1.08)
N_calc2 = int((X+1)*1.08)
if N_calc == N :
    print(X)
elif N_calc2==N:
    print(X+1)
else :
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

N = int(input())

NN = math.floor(N / 1.08)

NNN = math.floor(NN*1.08)

if N == NNN:
    print(NN)
else:
    if math.floor((NN+1)*1.08) == N:
        print(NN+1)
    else:
        print(':(')

Submission status: Accepted

Solution code:
N = int(input())
if N/1.08 == -(-N//1.08):
    print(int(N/1.08))
# もとの数の商より大きく，+1の商より小さい整数
else:
    if not -(-N//1.08) == -(-(N+1)//1.08):
        print(int((N+1)//1.08))
    else:
        print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())

zeinuki = math.floor(n / 1.08)
zeikomi = math.floor(zeinuki * 1.08)

if zeikomi == n:
    print(zeinuki)
elif zeikomi > n:
    if math.floor((zeinuki-1) * 1.08) == n:
        print(zeinuki-1)
    else:
        print(":(")
elif zeikomi < n:
    if math.floor((zeinuki+1) * 1.08) == n:
        print(zeinuki+1)
    else:
        print(":(")

Submission status: Accepted

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

def solve():
    N = int(input())
    for x in range(1, 50001):
        if floor(x*1.08) == N:
            return str(x)
    return ':('

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

tax_free_f = N/1.08
tax_free_int = math.ceil(tax_free_f)

if DEBUG_FREE:
    print("float    : %f"%tax_free_f)
    print("int      : %d"%tax_free_int)
    print("recover_f: %f"%(tax_free_int*1.08))
    print("recover_i: %d"%(int(tax_free_int * 1.08)))
    
if N == int(tax_free_int * 1.08):
    print(tax_free_int)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
def main():
    N = float(input())
    nuki = int(N//1.08)
    if int(nuki*1.08)==N:
        print(nuki)
    elif int((nuki+1)*1.08)==N:
        print(nuki+1)
    else:
        print(":(")
        
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n = int(raw_input())

done = False
for i in xrange(1, 50001):
    if int(i * 1.08) == n:
        ans = i
        done = True
        break

if not done:
    ans = ":("

print ans

Submission status: Accepted

Solution code:
n = int(input())
j = int(n / 1.08 )
#print(n/1.08,int(j*1.08))
if int(j*1.08) == n:
    print(j)
elif int((j+1)*1.08) == n:
    print(j+1)
elif int((j-1)*1.08) == n:
    print(j-1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

latest_num = (N + 1) // 1.08

y = 1.08 * latest_num

if N <= y:
    print(int(latest_num))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

x = n/1.08
t = math.floor(x*1.08)

for i in range(50010):
  if math.floor(i*1.08) == n:
    print(i)
    break
  if i == 50009:
    print(':(')

Submission status: Accepted

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

for x in range(Xi - 10, Xi + 10):
    if math.floor(x * 1.08) == N:
        print(x)
        sys.exit(0)
print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

M_1 = (N+1)/1.08
M_2 = (N)/1.08
if M_2 - int(M_2) == 0 :
    print(int(M_2))
else :
    if math.floor(math.ceil(M_2) * 1.08 ) == N :
        print(math.ceil(M_2))
    else :
        print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

X = math.floor(N / 1.08)

for i in range(2):
    ans = X+i
    if (math.floor(ans * 1.08) == N):
        print(ans)
        exit()
print(':(')

Submission status: Accepted

Solution code:
N = int(input())

a = N/1.08

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

Submission status: Accepted

Solution code:
import math

n = int(input())

for x in range(1,50000):
    ans = math.floor(x*1.08)
    if ans == n:
        print(x)
        exit()

print(':(')

Submission status: Accepted

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

if N % 27 == 13 or N % 27 == 26:
  print(':(')
else:
  Ans = N * 100 / 108
  A = math.ceil(Ans)
  print(A)

Submission status: Accepted

Solution code:
n = int(input())

tax = 1.08
x = n // tax
y = x + 1
#print(x)

if int(x * tax) == n:
    print(int(x))
    exit()

if int(y * tax)== n:
    print(int(y))
    exit()

print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

max = 50000
herf = 25000

arr = []
result = ':('

for t in range(50000):
  arr.append(t)

if herf > n:
  for s in range(herf):
    ans = math.floor(s * 1.08)
    if ans == n:
      result = str(s)
      break;
else:
  for s in range(25000, max):
    ans = math.floor(s * 1.08)
    if ans == n:
      result = str(s)
      break;

print(result)

Submission status: Accepted

Solution code:
import math
pay = int(input())
est_price = math.ceil(pay/1.08)

#print(est_price)
if math.floor(est_price * 1.08) == pay:
  print(est_price)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  N = int(input())
  X = 1
  
  for X in range(50000):
    if int(X * 1.08) == N:
      return X
  return ":("

print(main())

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

Submission status: Accepted

Solution code:
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))
MOD = 10**9 + 7

n = INT()
if int(n*100/108) < int((n+1)*100/108) and (n+1)*100 %108 != 0:
    print(math.ceil(n*100/108))
elif n*100 % 108 == 0:
    print(n*100//108)
else:
    print(':(')

Submission status: Accepted

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

for i in range(50000+10):
 x1 = int(i*1.08)
 x2 = i*1.08
 #print(i,x1,x2)
 if(x1 == N): ans = i
 elif(x2 == N): ans = i
  
  
if(ans == -1):
 print(':(')
else:
 print(ans)

Submission status: Accepted

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

x = n / 1.08
x_p = math.floor(x) + 1
x_n = math.floor(x) - 1


if x%1 == 0:
    print(int(x))
else:
    if math.floor(x_p * 1.08) == n:
        print(math.floor(x_p))
    elif math.floor(math.floor(x) * 1.08) == n:
        print(math.floor(x))
    elif math.floor(x_n * 1.08) == n:
        print(math.floor(x_n*1.08))
    else:
        print(':(')

Submission status: Accepted

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

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

a_=math.floor(a*1.08)
b_=math.floor(b*1.08)

if a_==N:
    print(math.floor(a))
elif b_==N:
    print(math.floor(b))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

paid = int(input())
price = int(paid/1.08)

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
start = int(n//1.1)
lis = []
for i in range(start,n+1):
    lis.append(i)
new_lis = []
for l in lis:
    new_lis.append(int(l*1.08))
if n in new_lis:
    for li in lis:
        if int(li*1.08) == n:
            print(li)
            sys.exit()
else:
    print(":(")

Submission status: Accepted

Solution code:
def main():
    from math import floor
    N = int(input())
    for i in range(50000):
        if floor(i*1.08) == N:
            return print(i)
    else:
        print(":(")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
x = n * 25
if x % 27 == 0:
    x //= 27
else:
    x = x // 27 + 1
if x * 27 // 25 == n:
    print(x)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor

input = sys.stdin.readline


def main():
    n = int(input())
    x = n / 1.08
    if n == floor(ceil(x) * 1.08):
        print(ceil(x))
    elif n == floor(floor(x) * 1.08):
        print(floor(x))
    else:
        print(":(")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

X = int(input())

notax = math.ceil(X / 1.08)

if notax < (X + 1) / 1.08:
    print(notax)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

X = int(N / 1.08)

ans = -1
while int(X * 1.08) <= N:
    if int(X * 1.08) == N:
        ans = X
    X += 1
    
if ans > 0:
    print(ans)
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
A = int(N / 1.08)
B = int(N / 1.08 + 1)



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

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

Submission status: Accepted

Solution code:
import math

N = int(input())
X = math.floor(N/1.08)
while X < N/1.08 + 1/1.08:
  if N/1.08 <= X  and X < N/1.08 + 1/1.08:
    X = X
    break
  else:
    X = X+1
 
    
if (N+1)%27 == 0 or (N+14)%27 == 0:
  print(':(')
else:
  print(X)

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
from decimal import Decimal, ROUND_HALF_UP
import math
input = sys.stdin.readline
#sys.setrecursionlimit(1e9)

def main():
    """code here"""
    N = int(input())
    for i in range(N+1):
        if int(math.floor(i*1.08))==N:
            print(i)
            exit()
    print(":(")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
N=int(input())
Min=N/1.08
Max=(N+1)/1.08
Mi=int(math.ceil(Min))
Ma=int(math.floor(Max))
if Mi==Max:
  print(":(")
elif Ma<Mi:
  print(":(")
else:
  print(Mi)

Submission status: Accepted

Solution code:
import math
n = int(input())
x = int(n // 1.08)
a = [x - 1, x , x +1]

ans = ':('
for i in a:
    if int(math.floor(i * 1.08))  == n:
        ans = i
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=int(n/1.08)+1
if (ans*1.08)//1==n:
    print(ans)
elif n*100%108==0 and (ans-1)*1.08==n:
    print(ans-1)
else:
    print(':(')

Submission status: Accepted

Solution code:
N=int(input())
X=int(N//1.1)
ans=":("
for i in range(X, N+10):
  if int(i*1.08)==N:
    ans=i
    break
print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())

ans = round(n * 100 / 108)
# print(ans)

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

Submission status: Accepted

Solution code:
price = int(input())

N =price//1.08
if (N)*1.08 >= price and (N)*1.08 < price+1:
  print(int(N))
elif (N+1)*1.08 >= price and (N+1)*1.08 < price+1:
  print(int(N+1))
else:
  print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(46298) :
    num = int(i * 1.08)
    if num == n :
        a = 1
        print (i)
        break

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

Submission status: Accepted

Solution code:
import math

N = int(input())

ans = int(N // 1.08)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


for i in range(50001):
    if N == int(i * 1.08):
        print(i)
        exit(0)
print(':(')

Submission status: Accepted

Solution code:

nums = {}

for w_tax in range(1, 50000+1):
    nums[w_tax] = ":("

for wo_tax in range(1, 50000+1):
    w_tax = int(wo_tax * 1.08)
    nums[w_tax] = wo_tax

#for w_tax in range(1, 50000+1):
#    wo_tax = int(w_tax * 100 / 108)
#    nums[w_tax] = wo_tax

a = int(input()) 
out = nums[a]
print(out)

Submission status: Accepted

Solution code:
n = int(input())

a = n//1.08
#print(a)
#print(a*1.08,int(a*1.08//1))
#print((a+1)*1.08,int((a+1)*1.08//1))
if int(a*1.08//1) == n:
	print(int(a))
elif int((a+1)*1.08//1) == n:
	print(int(a+1))
else:
	print(":(")

Submission status: Accepted

Solution code:
import math
a=float(input())
#print(math.floor(a/1.08))
#print(math.floor(a/1.08)*1.08)
#print(math.ceil(a/1.08))
#print(math.floor(math.ceil(a/1.08)*1.08))
#print(math.floor(math.floor(a/1.08)*1.08))
if math.floor(math.floor(a/1.08)*1.08) ==a or math.floor(math.ceil(a/1.08)*1.08) ==a:
  print(math.ceil(a/1.08))
else:
  print(":(")

Submission status: Accepted

Solution code:
a = int(raw_input())
from math import floor
for i in range(1,50001):
  r = int(floor(i + i*0.08))
  if r > a:
    ans = ":("
    break
  if r == a:
    ans = i
    break
  else:
    continue
print(ans)

Submission status: Accepted

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

if int(math.floor(x*1.08)) == n :
    print(int(x))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
x_1 = int(n/1.08)
x_2 = int(n/1.08)+1
if int(x_1*1.08) == n:
  print(x_1)
elif int(x_2*1.08) == n:
  print(x_2)
else:
  #print(x_1,x_2)
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

n1 = N / 1.08

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

Submission status: Accepted

Solution code:
import math

n = int(input())

a = int(math.floor(n / 1.08))

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

Submission status: Accepted

Solution code:
import math
import decimal

def main():
    n = int(input())
    x = n / 108 * 100

    x_int_list = [math.ceil(x), math.floor(x)]
    for temp_x in x_int_list:
        temp_n1 = temp_x * 1.08
        temp_n2 = int(temp_n1)
        # temp_n2 = decimal.Decimal(str(temp_n1)).quantize(decimal.Decimal('0'), rounding=decimal.ROUND_HALF_UP)
        if temp_n2 == n:
            print(temp_x)
            return
    print(':(')


if __name__ == '__main__':
    main()

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

n = int(input())
x = ceil(n / 1.08)
if int(x*1.08) == n:
    print(x)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


def ans(N):
    for X in range(1, N+1):
        if int(X * 1.08) == N:
            return X
    return ":("


print(ans(N))

Submission status: Accepted

Solution code:
N=int(input())

X1=int(N/1.08)

while X1 * 1.08 < N + 1:
    if (int(X1 * 1.08) == N):
        print(X1)
        exit( )
    X1 += 1
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:
# -*- coding: utf-8 -*-

import sys
import math

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])

    return (n, )


def solve(n):


    x = n / 1.08

    a = int(math.floor(math.floor(x) * 1.08))
    b = int(math.floor(math.ceil(x) * 1.08))

    result = ':('
    if a == n:
        result = str(int(math.floor(x)))

    if b == n:
        result = str(int(math.ceil(x)))


    return result 


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())

a = np.arange(50000)
a_t = (a * 1.08).astype(np.int32)

if n in a_t:
    print(*a[np.where(a_t == n)])
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
nt = int(n * (100/108))
tt = 108/100
ntt = int(nt * tt)
if n == ntt:
    print(nt)
    exit()
ntt = int((nt + 1) * tt)
if n == ntt:
    print(nt + 1)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
n = int(N/1.08)
while(True):
    apple = int(n*1.08)
    if apple<N:
        n+=1
    elif apple==N:
        print(n)
        break
    elif apple>N:
        print(':(')
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

for x in range(N + 1):
    if math.floor(x * 1.08) == N:
        print(x)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math


N = int(input())

ans = 0
flag = False
for X in range(N+1):
    if math.floor(X * 1.08) == N:
        ans = X
        flag = True
        break
if flag:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())

x1 = math.floor(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())

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

Submission status: Accepted

Solution code:
from decimal import *
N=Decimal(input())
X=Decimal(N/Decimal("1.08"))
X=int(X)
if int(X*Decimal("1.08"))==int(N):
    print( '{:.10g}'.format(int(X)))
elif int((X+1)*Decimal("1.08"))==int(N):
    print( '{:.10g}'.format(int(X+1)))
else:
    print(str(':('))

Submission status: Accepted

Solution code:
import math
N=int(input())
ans=0
for i in range(N+1):
  tmp=math.floor(i*1.08)
  if (tmp==N) :
    ans=i
    break

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------        ]
    N = int(input())
    X1 = math.floor(N/1.08)
    X2 = math.ceil(N/1.08)
    if math.floor(X1*1.08) == N:
        print(X1)
    elif math.floor(X2*1.08) == N:
        print(X2)
    else:
        print(":(")
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

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

tax = 1.08
tmp = n / tax
if tmp.is_integer():
    print(int(tmp))

else:
    tmp = math.floor(tmp)
    if int(math.floor((tmp - 1) * tax)) == n:
        print(int(math.floor(tmp - 1)))
    elif int(math.floor((tmp) * tax)) == n:
        print(int(math.floor((tmp))))
    elif int(math.floor((tmp + 1) * tax)) == n:
        print(int(math.floor((tmp + 1))))
    else:
        print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())
x = 100 * n // 108
y1 = int(x * 1.08)
y2 = int((x + 1) * 1.08)
if n == y1:
    print(x)
elif n == y2:
    print(x + 1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

x_min = math.floor(N / 1.08)
x_max = (N + 1) / 1.08

x_list = [x_min, x_min + 1]
for x in x_list:
    if math.floor(x * 1.08) == N:
        print(x)
        exit()
print(':(')

Submission status: Accepted

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

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

lst = list(range(math.ceil(a), math.ceil(b)))
if lst:print(lst[0])
else:print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
l = N/1.08
r = (N+1)/1.08
if math.ceil(l)<r:
    print(math.ceil(l))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
val = N / 1.08
val_min = math.floor(val)
val_max = val_min + 1
price_min = math.floor(val_min * 1.08)
price_max = math.floor(val_max * 1.08)
if price_min == N:
    print(val_min)
elif price_max == N:
    print(val_max)
else:
    print(":(")

Submission status: Accepted

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

if math.modf(n / 1.08)[0] == 0:
    ans = math.floor(n / 1.08)
else:
    ans = math.floor(n / 1.08) + 1

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

Submission status: Accepted

Solution code:
N = int(input())

origin_start = N//1.08

origins = [origin_start + i for i in range(5)]

result = ":("
for origin in origins:
  if int(origin * 1.08) == N:
    result = int(origin)
print(result)

Submission status: Accepted

Solution code:
n = int(input())

tmp = int(n*100/108)
a = int(tmp*108/100)
b = int((tmp+1)*108/100)

if a != n and b!= n:
	print(':(')
elif a == n:
 	print(tmp)
else:
 	print(tmp+1)

Submission status: Accepted

Solution code:
x=int(input())
if(-((-x)//1.08)<(x+1)/1.08):
    print(int(-((-x)//1.08)))
else:
    print(":(")

Submission status: Accepted

Solution code:
from decimal import *
N=int(input())
a=int(N/1.08)
flg=False
ans=0
for i in range(a-1,a+2):
    if int(i*1.08)==N:
        flg=True
        ans=i
print(ans if flg else ":(")

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

X = int(N/1.08)
i = 0
while True:
  if int((X+i)*1.08) == N:
    print(int(X+i))
    break
  elif int((X + i)* 1.08) > N:
    print(":(")
    break
  else:
    i += 1

Submission status: Accepted

Solution code:
N=int(input())

P=N//1.08
A=(P*1.08)//1
B=((P+1)*1.08)//1

if A!=N and B!=N:
	print(":(")
elif A==N:
	print(int(P))
else:
	print(int(P+1))

Submission status: Accepted

Solution code:
import math

N = int(input())

a = int(round(N / 1.08))
b = a + 1
#print(a, b)

A = int(math.floor(a*1.08))
B = int(math.floor(b*1.08))
#print(A, B)

if A == N:
    print(a)
elif B == N:
    print(b)
else:
    print(":(")

Submission status: Accepted

Solution code:
#[int(i) for i in input().split()]
import math
n = int(input())
genka_min = n * 100 / 108
genka_max = (n+1) * 100 / 108
ok = 0
ans = 0

for i in range(math.floor(genka_min),math.ceil(genka_max)+1):
    if  math.floor(i*1.08) == n:
        ok = 1
        ans = i
if ok:
    print(ans)
else:
    print(":(")