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

n = int(input())
x = math.ceil(n / 108 * 100)

if math.floor(x * 108 / 100) == n:
    print(x)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
n = math.floor(N / 1.08)
ans = ':('

if (int(n*1.08) == N):
  ans = n
  
if (int((n+1)*1.08) == N):
  ans = n+1

print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
from math import floor, ceil
N = int(input())
tmp = floor(N / 1.08)
tmp2 = ceil(N / 1.08)
flag = False
if floor(tmp * 1.08) == N:
    print(tmp)
elif floor(tmp2 * 1.08) == N:
    print(tmp2)
else:
    print(":(")

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

x = np.arange(1, 50001)
y = (x * 1.08).astype(np.int)
v = np.argwhere(y == N)

if len(v) == 0:
    print(':(')
else:
    
    print(x[v[0]][0])

Submission status: Accepted

Solution code:
TAX = 1.08
value = int(input())

row_cost = int(value / TAX)

flag = False
echo_cost = 0
if int(row_cost * TAX) == value:
    flag = True
    echo_cost = int(row_cost )
elif int((row_cost + 1) * TAX) == value:
    flag = True
    echo_cost = int(row_cost + 1)

else :
    flag = False

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

Submission status: Accepted

Solution code:
import math

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

price1 = int(x1*1.08)
price2 = int(x2*1.08)

if price1 == N:
    print(x1)
elif price2 == N:
    print(x2)
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())
X = int(N/1.08)
X2 = X+1

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

Submission status: Accepted

Solution code:
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
a = int(input())
x = a/1.08
if not x.is_integer():
    b = math.ceil(x)
    c = math.floor(x)
    if int(c*1.08) == a:
        print(c)
    elif int(b*1.08) == a:
        print(b)
    else:
        print(":(")
else:
    if int(x*1.08) == a:
        print(int(x))
    else:
        print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
if math.ceil(N/1.08)*1.08>=N and math.ceil(N/1.08)*1.08<N+1:
    print(math.ceil(N/1.08))
else:
    print(':(')

Submission status: Accepted

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

if a == b2:
    print(b)
elif a == c2:
    print(c)
else:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = math.ceil(n / 1.08)
m = math.floor(ans * 1.08)

if n == m:
    print(ans)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

n = round(N/1.08)


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

Submission status: Accepted

Solution code:
import sys
# input = sys.stdin.buffer.readline
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import heapq
import bisect
import copy
# import math
def warshall_floyd(d, N):
    for k in range(N):
        for i in range(N):
            for j in range(N):
                d[i * N +j] = min(d[i * N +j], d[i * N + k] + d[k * N + j])
    return d

MOD = 10**9 + 7

def main():
    n = getN()
    for i in range(50001):
        if (i * 1.08) // 1 == n:
            print(i)
            return

    print(":(")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

N = int(input())

for A in range(1, 50001):
    if N == math.floor(A * 1.08):
        print(A)
        exit()

print(":(")

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)
    else:
        print(':(')
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
 
#int(X * 1.08) = N

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())
a = int(N//1.08)
if N == math.floor(a*1.08):
    print(a)
elif N == math.floor((a+1)*1.08):
    print(a+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
a = int(input())
import math
u = a/1.08

ax = math.ceil(u)
z = math.floor(u)

if math.floor(ax * 1.08) != a and math.floor(z * 1.08) != a:
    print(':(')
else:
    if math.floor(ax*1.08) == a:
        print(ax)
    else:
        print(z)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


from sys import exit


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    n = ii()
    if n<13:
        print(n)
        exit()


    for i in range(1,50000):
        if (i*108)//100 == n:
            print(i)
            exit()
    print(":(")


        


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor

N=int(input())
OKflag=False

# Nまでの整数について算出してゆく
for n in range(1,N+1):
    if floor(n*1.08)==N: # もし計算してNと一致したら
        print(n)
        OKflag=True # 見つかったのでフラグを立てる
        break

if OKflag==False: # もし見つからなかったら
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

ans = n * 100 // 108

n1 = ans * 108 // 100
n2 = (ans + 1) * 108 // 100

if n == n1:
  print(ans)
elif n == n2:
  print(ans + 1)
else:
  print(":(")

Submission status: Accepted

Solution code:
n = int(input())

tmp = int(n/1.08)
if(int(tmp*1.08) == n):
    print(tmp)
    exit()
elif(int((tmp+1)*1.08) == n):
    print(tmp+1)
    exit()
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = int((n+1)/1.08)
n2 = int(x*1.08)

if n != n2:
    print(':(')
else:
    print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
x = int(N / 1.08)
for y in range(x, x + 3):
    p = int(1.08 * y)
    if p == N:
        print(y)
        exit(0)
print(':(')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
import math
n=int(input())
t=0
for i in range(100000):
  t=math.floor(i*1.08)
  if(t==n):
    print(i)
    break
  if(i>n):
    print(":(")
    break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(N):
    now = N - i
    if now * 1.08 // 1 == N:
        print(now)
        exit()

print(':(')

Submission status: Accepted

Solution code:
from decimal import Decimal, ROUND_HALF_UP
N = int(input())

X = 100*N // 108
# X = int((X+0.5)//1)
if (X * 1.08)//1 == N:
    print(X)

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

Submission status: Accepted

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

for i in range(50001):
    if N == math.floor(i * 1.08):
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

tax = int(N - N / 1.08)
moto = N - tax

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

Submission status: Accepted

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

for x in range(1, 50001):
    temp = x * 1.08

    if N <= temp < (N + 1):
        print(x)
        sys.exit()

print(":(")

Submission status: Accepted

Solution code:
x=[]
for i in range(1,50001):
    x.append(int(i*1.08))

n=int(input())
for i in range(50000):
    if n==x[i]:
        print(i+1)
        break
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3.4.3
import math

n = int(input())
x = n / 1.08
x = math.floor(x)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Answer1 = N//1.08
Answer2 = Answer1 + 1

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

Submission status: Accepted

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

#print(no_tax)
#print(n/1.08)
#print(int(927*1.08))

if int(no_tax*1.08)==n:
  print(int(no_tax))
elif int((no_tax+1)*1.08)==n:
  print(int(no_tax+1))
else:
  print(":(")

Submission status: Accepted

Solution code:
import math
N=int(input())
A=math.floor(N/1.08)
B=math.floor(A*1.08)
if B==N:
  print(A)
else:
  B=math.floor((A+1)*1.08)
  if B==N:
    print(A+1)
  else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
a=1
for i in range(50000):
  if math.floor(i*1.08)==n:
    print(i)
    a=0
if a==1:
  print(":(")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys
f = sys.stdin
n = int(f.readline())

result = ':('
x2 = int(n / 1.08)
if int(x2 * 1.08) == n:
    result = x2
x1 = x2 - 1
if int(x1 * 1.08) == n:
    result = x1
x3 = x2 + 1
if int(x3 * 1.08) == n:
    result = x3

print(result)

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

n = int(input())

a = math.floor(n/1.08)

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

Submission status: Accepted

Solution code:
n=int(input())
f=False
for i in range(1,5*10**4+1):
  if n==i*1.08//1:
    f=True
    break
if f:
  print(i)
else:
  print(":(")

Submission status: Accepted

Solution code:

def main():
    N = int(input())
    left = N / 1.08
    right = (N+1) / 1.08
    for i in range(int(left - 1), int(right + 1) + 1):
        if left <= i < right:
            print(i)
            return
    print(":(")
main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
#　三井住友B
import math
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n = ni()
ans = 0

ans = (n*100)/108

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

X = math.floor(N/1.08)
X2 = math.floor(X*1.08)

#print(X,X2)
while(N>X2):
  X=X+1
  X2 = math.floor(X*1.08)

#print(X2)
if N==X2:
  print(X)
  
else:
  print(":(")

Submission status: Accepted

Solution code:
from sys import stdin
a = int(stdin.readline().rstrip())
b = 0
for i in range(a+1):
    if int(i * 1.08) == a:
        m = i
        b = 1
if b == 0:
    m = (':(')

print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


ans = ":("
for i in range(50000):
    if i * 1.08 // 1 == N:
        ans = i
        break

print(ans)

Submission status: Accepted

Solution code:
import math

m = int(input())
tmp = False
for i in range(1, 51000):
    if int(math.floor(i * 1.08)) == m:
        tmp = True
        count = i
        break
if tmp:
    print(i)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

flag = False
for v in range(int(n/1.08)-3, int(n/1.08)+3):
    if int(v*1.08) == n: 
        flag = True
        break

if flag:
    print(v)
else:
    print(':(')

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math
import math
def sol(n):
    A = math.floor(math.ceil(n/1.08) * 1.08) == n
    if A:
        return math.ceil(n/1.08)
    B = math.floor(math.floor(n/1.08) * 1.08) == n
    if B:
        return math.floor(n/1.08)
    return ":("



do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    #k = int(parsed_lines[0][1])
    #S = parsed_lines[0][0]
    return n


if not do_submit:
    S = input_parse("""
    432
    """)
    print(sol(S))

    S = input_parse("""
    1079
    """)
    print(sol(S))

    S = input_parse("""
    1001
    """)
    print(sol(S))



else:
    #A, B = list(map(int, input().split()))
    S = int(input())
    print(sol(S))

    # S = input().strip()
    # print(sol(S))

Submission status: Accepted

Solution code:
import math
n = int(input())
if n != 1 and (n%27 == 13 or n%27 == 26):
  print(":(")
else:
  print(math.ceil(n/1.08))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

N = int(input())

result = math.ceil(N / 1.08)

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

Submission status: Accepted

Solution code:
n = int(input())

a = int(n / 1.09)
b = int(n / 1.07)

flag = 0
for i in range(a, b+2):
    if int(1.08 * i) == n:
        print(i)
        flag = 1
        break

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

Submission status: Accepted

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

m = math.floor(N / 1.08)
M = math.ceil(N / 1.08) + 1

for t in range(m, M):
    if math.floor(t * 1.08) == N:
        print(t)
        quit()
print(":(")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n=int(input())
    floor=n*100//108
    ceil=(n*100+107)//108
    if floor*108//100==n:
        print(floor)
    elif ceil*108//100==n:
        print(ceil)
    else:print(":(")
main()

Submission status: Accepted

Solution code:
n = int(input())
c = n // 1.08
while int(c * 1.08) < n:
    c += 1
if int(c * 1.08) == n:
    print(int(c))
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

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

print(":(")

Submission status: Accepted

Solution code:
N=int(input())
if N%27==13 or N%27==26:
  print(':(')
elif N%27 == 0:
    print((N*50)//54)
else:
    print(((N*50)//54)+1)

Submission status: Accepted

Solution code:
import math

n = input()
n = int(n)

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

x = math.ceil(a)

if x >= b:
  print(":(")
else:
  print(x)

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
X1 = N//1.08
X2 = (N+1)//1.08
if (int(X1) == int(X2)) and (int(X1)*1.08!=N):
  print(":(")
else:
  print(int(X2))

Submission status: Accepted

Solution code:
n=int(input())
flag=0
a=float
for i in range(1,n+1):
    if int(i*1.08)==n:
        print(i)
        flag+=1
        break
if flag==0:
    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(int(X))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math


total = int(input())

without_tax = math.ceil(total * 100 / 108)
with_tax = math.floor(without_tax * 1.08)

if with_tax != total:
    print(":(")
    exit(0)

print(without_tax)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

i = 0
ans = ':('

while i < 50000:
  if int(i * 1.08) == n:
    ans = i
    break
  else:
    i += 1

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
from math import floor
n = int(input())
noTax = n/1.08

noTax = floor(noTax)

# print(noTax)
# print(floor(noTax) * 1.08)

if floor(noTax * 1.08) == n:
    print(floor(noTax))
elif floor((noTax + 1) * 1.08) == n:
    print(noTax + 1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
for i in range(50001):
  if math.floor(i*1.08) == N:
    print(i)
    break
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
a = int(input())


ans = a/1.08

if int(math.floor(ans)*1.08) == a:
    ans = math.floor(ans)
elif int(math.ceil(ans)*1.08) == a:
    ans = math.ceil(ans)
else:
    ans = ":("

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
rate = 1.08

for i in range(max(n - 13, 0) + 1, n + 13 + 1):
  ans = int(i / rate)
  if int(ans * rate) == n:
    print(ans)
    break
  if i == n + 13 :
    print(":(")
    break

Submission status: Accepted

Solution code:
n = int(input())
ans = n/1.08
# print(ans)
import math
ans1 = math.floor(ans)
ans2 = math.ceil(ans)
# print(ans1,ans2)
if math.floor(ans1*1.08) == n or math.floor(ans2*1.08) == n:
	if math.floor(ans1*1.08) == n:
		print(ans1)
	else:
		print(ans2)
else:
	print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(':(')

Submission status: Accepted

Solution code:
import math

n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil, floor
N = int(input())
f = N / 1.08
f_c = ceil(f)
f_f = floor(f)

if floor(f_c *1.08) == N:
    print(f_c)
elif floor(f_f * 1.08) == N:
    print(f_f)
else:
    print(':(')

Submission status: Accepted

Solution code:

import math

n = int(input())
max_x = (n + 1) / 1.08
min_y = n / 1.08

ans = [i for i in range(math.ceil(min_y), math.ceil(max_x))]
if len(ans) == 0:
	print(":(")
else:
	print(ans[0])

Submission status: Accepted

Solution code:
n = int(input())

for i in range(1, 50001):
    if (i * 1.08) // 1 == n:
        print(i)
        break
    elif i == 47000:
        print(":(")

Submission status: Accepted

Solution code:
N = int(input())

X = int(N * 100 / 108)-1

while True:
  if int(X * 1.08) == N:
    print(X)
    break
  if int(X * 1.08) >= N+1:
    print(":(")
    break
  X += 1

Submission status: Accepted

Solution code:
N = int(input())

x = int(N//1.08)
xx = int(x + 1)

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

Submission status: Accepted

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


def solve(tc):
    n = int(stdin.readline().strip())
    x = n / 1.08
    if int(math.floor(x)*1.08)==n:
        print(int(x))
        return
    if int(math.ceil(x)*1.08)==n:
        print(int(x+1))
        return
    print(":(")


LOCAL_TEST = not __debug__
if LOCAL_TEST:
    infile = __file__.split('.')[0] + "-test.in"
    stdin = open(infile, 'r')

tcs = (int(stdin.readline().strip()) if LOCAL_TEST else 1)
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
flag = 0

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

print(i if flag == 1 else ':(')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import ceil, floor

n = int(input())

x = n / 1.08

if x % 1 == 0:
    print(int(x))
    exit()

if n == floor(ceil(x) * 1.08):
    print(ceil(x))
    exit()
   
print(':(')

Submission status: Accepted

Solution code:
from pprint import pprint
import sys


def solve(n):
    for x in range(50001):
        if int(x * 1.08) == n:
            print(x)
            return
        elif x >= n:
            print(":(")
            return
    print(":(")
    

if __name__ == "__main__":
    n = int(sys.stdin.readline().strip())
    solve(n)

Submission status: Accepted

Solution code:
X = int(input())
flag = False
ans = 0
for i in range(X+1):
    if(int(i * 1.08) == X):
        ans = i
        flag = True

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

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:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    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(':(')


main()

Submission status: Accepted

Solution code:
import math

n=int(input())
check=0
for x in range(1,50001):
    if math.floor(x*1.08)==n:
        check=1
        ans=x
        break
print(ans if check==1 else ":(")

Submission status: Accepted

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

n = int(input())

ls_x = []
ls_x.append( int(n/1.08) )
ls_x.append( int(n/1.08) + 1 )

# print(ls_x)

for x in ls_x:

    y = int(x*1.08)
    # print(y)

    if y==n:
        print(x)
        exit()
    elif y<(n+1) and y>n:
        print(x)
        exit()

print(":(")
exit()

Submission status: Accepted

Solution code:
A=int(input())
B=(A*100)//108

if((((B*1.08)//1)==A)):
    print(B)
elif((((B+1)*1.08)//1)==A):
    print(B+1)
else:
    print(":(")

Submission status: Accepted

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

k = m/1.08
m1 = math.ceil(k)
m2 = math.floor(k)

if int(m1 * 1.08) == m:
    print(m1)
elif int(m2 * 1.08) == m:
    print(m2)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
N = int(input())
if N <= 12:
    print(N)
    sys.exit()
else:
    for i in range(N):
        if int(i * 1.08) == N:
            print(i)
            sys.exit()
        else:
            None
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

x = N / 1.08

for i in range(int(x) - 2, int(x) + 3):
    if int(i * 1.08) == N:
        print(i);
        exit()

print(":(");

Submission status: Accepted

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

x_int = int(x)

while int(x_int * 1.08) < n:
  x_int += 1
  
if int(x_int * 1.08) == n:
  print(x_int)
else:
  print(':(')

Submission status: Accepted

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

beforeTax = math.floor(n / 1.08)
afterTax = lambda x: math.floor(x * 1.08)

if n == afterTax(beforeTax):
    print(beforeTax)
elif n == afterTax(beforeTax+1):
    print(beforeTax+1)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
import sys

N = int(input())

X2 = math.floor(N / 1.08)
X1 = X2 - 1
if X1 < 0:
    X1 = 0
X3 = X2 + 1
if math.floor(X1 * 1.08) == N: 
    print(X1)
elif  math.floor(X2 * 1.08) == N:
    print(X2)
elif  math.floor(X3 * 1.08) == N:
    print(X3)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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