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

Submission status: Accepted

Solution code:
import math

n = int(input())

x = round(n/1.08)

m = math.floor(x * 1.08)

if n != m:
    x=x+1
    m = math.floor(x * 1.08)
    if n != m:
        print(":(")
    else:
        print(x) 
else:
    print(x)

Submission status: Accepted

Solution code:
N = int(input())

a = int(N / 1.08 + 0.9)
b = int(a * 1.08)

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

Submission status: Accepted

Solution code:
# -*- Coding: utf-8 -*-
import sys
i=0
zeibiki=[0]*50000
zeiari=[0]*50000

for i in range(50000):
    zeibiki[i]=int((i+1))
for i in range(50000):
    zeiari[i]=int((i+1)*1.08)
    #print(zeibiki[i],zeiari[i])
#print(zeibiki[4999])
N=int(input())
#print(1001*1.08)

#x=N/1.08
#print(int(x))
#NN=x*1.08
#print(NN)

i=0
for i in range(50000):
    if N==zeiari[i]:
        print(zeibiki[i])
        sys.exit()
    else:
        pass

print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
for i in range(math.floor(N-N*0.08),math.ceil(N+N*0.08)):
    num = int(i) * 1.08
    if math.floor(num) == N:
        ans = num
        ans_i = i
        break
if ans == 0:
    print(":(")
else:
    print(ans_i)

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

print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def beforeTax(n):
  li = int(n // 1.08)
  if int(li * 1.08) == n:
    print(li)
  elif int((li + 1) * 1.08) == n:
    print(li + 1)
  else:
  	print(':(')
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  n = [int(_) for _ in in_str.split()][0]
  beforeTax(n)

Submission status: Accepted

Solution code:
N = int(input())

flag = 1
X_ = -1
for X in range(1, N + 1):
    money = int(X * 1.08)
    if N == money:
        X_ = X
        flag = 0
        break

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

Submission status: Accepted

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

def main():
    N=int(input())

    tax_free = int(N / 1.08)
    tax_free_2 = tax_free + 1

    result = tax_free if int(tax_free*1.08) == N else (tax_free_2 if int(tax_free_2*1.08) == N else ":(")
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

N = int(input())

for i in range(50001):
    price = math.floor(i * 1.08)
    if (N == price):
        print(i)
        exit(0)

print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from math import ceil, floor
N = int(input())
X = ceil(N/(1.08))
M = floor(X*1.08)

if M==N:
    print(X)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

x1 = n / 1.08
x2 = (n + 1) / 1.08
if x1.is_integer():
        print(int(x1))
elif int(x1) == int(x2):
    print(':(')
elif int(x2) == int(x1 + 1) and x2.is_integer():
    print(':(')
else:
    print(int(x1 + 1))

Submission status: Accepted

Solution code:
N =int(input())

count = 0
ans = 0

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

Submission status: Accepted

Solution code:
import math

n = int(input())

nontax = math.floor(n / 1.08)

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

Submission status: Accepted

Solution code:
N = int(input())

S = N // 1.08 + 1
T = round(S) * 1.08

if T == N:
  print(round(S))
elif N < T < N + 1:
  print(round(S))
else:
  print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
N = int(input())

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

Submission status: Accepted

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

N = int(input())
# X, Y = map(int,input().split())
# Z, W = map(int,input().split())
# vA = list(map(int, input().split()))

for x in range(N+1):
    if int(x * 1.08) == N:
        print(x)
        exit(0)
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())

p = math.ceil(N / 1.08) #税抜き価格計算
o = int(p * 1.08) #税込み価格計算

if o == N:
    print(int(p))
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 math
N = int(input())
for i in range(1,50000+1):
    ans = math.floor(i * 1.08)
    if N==ans:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
X = N / 1.08
min_x = np.floor(X)
max_x = np.ceil(X)
if max_x != min_x:
    for i in range(int(min_x), int(max_x+1)):
        if int(i * 1.08) == N:
            print(i)
            break
        elif i == max_x:
            print(':(')
            break  
        else:
            continue
else:
    print(int(min_x))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
import math
N1=round(N/1.08)
for i in range(20):
    if N==math.floor((N1-10+i)*1.08):
        print(N1-10+i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

X = int(N // 1.08)
a = N*100 % 108
x = X+1
 
if a == 0:
    print(x)

elif x*1.08 >= N and x*1.08 < N+1:
    print(x)

elif X*1.08 >= N and X*1.08 < N+1:
    print(X)

else:
    print(":(")

Submission status: Accepted

Solution code:
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

#a = list(map(int, input().split()))

n = int(input())

ans = [-1 for i in range(80002)]
for i in range(50002):
    price = int((i*1.08)//1)
    ans[price] = i

if(ans[n]!=-1):
    print(ans[n])
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
min = N//1.08
min_a = N%1.08
if min_a != 0:
  min = min +1
max = (N + 1)//1.08
max_a = (N + 1)%1.08
if min > max:
  print(':(')
else:
  print(int(min))

Submission status: Accepted

Solution code:
import math

n = int(input())

if n * 100 % 108 == 0:
    print(n * 100 // 108)
else:
    price = math.floor((n * 100 // 108 + 1) * 1.08)
    if n == price:
        print(n * 100 // 108 + 1)
    else:
        print(":(")

Submission status: Accepted

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

C = N / 1.08
d = math.ceil(C)
n = math.floor(d * 1.08)

if n == N:
  print(d)
  
  
else:
  print(":(")

Submission status: Accepted

Solution code:
amount = int(input())
before_tax = int(amount / 1.08)
after_tax = before_tax + 1
if int(after_tax * 1.08) == amount:
  print(int(after_tax))
elif int(before_tax * 1.08) == amount: 
  print(int(before_tax))
else:
  print(":(")

Submission status: Accepted

Solution code:
N = int(input())

N_notax = int(- (-N // 1.08))

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

Submission status: Accepted

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

plow = ms.floor(N / 1.08)
# print(plow)
flag = 0

# print(plow * 1.08)
# print( (plow + 1) * 1.08)

if ms.floor(plow * 1.08) == N:
    flag = 1
elif ms.floor((plow + 1) * 1.08) == N:
    flag = 1
    plow += 1
    
if flag == 1:
    print(plow)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
def main():
  N = int(input())
  if (N < 1 or N > 50000):
    print(":(")

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

main()

Submission status: Accepted

Solution code:
N = int(input())
s = []
for i in range(50000):
    s.append(int((i+1)*1.08))
if N in s:
    print(int(N/1.08+1/1.08))
else:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
import numpy as np
import math
s = input().split(" ")
s = [int(s[i]) for i in range(len(s))]
taxIncludedPrice = s[0]

# taxIncludedPrice = int(price * 1.08) <= price * 1.08
# price >= taxIncludedPrice / 1.08
# price * 1.08 - 1 < taxIncludedPrice
# price < (taxIncludedPrice + 1) / 1.08

minPrice = taxIncludedPrice / 1.08
maxPrice = (taxIncludedPrice + 1) / 1.08
fromPrice = math.ceil(minPrice)
toPrice = math.floor(maxPrice)


def getPrice(fromPrice, toPrice):
    for price in range(fromPrice, toPrice + 1):
        if fromPrice >= minPrice and fromPrice < maxPrice:
            return price
        elif toPrice >= minPrice and toPrice < maxPrice:
            return price
    return ":("


print(getPrice(fromPrice, toPrice))

Submission status: Accepted

Solution code:
import math
N = int(input())
kari = N*100/108
hako = math.ceil(kari)
ans = math.floor(kari)
if  hako*108/100==N or ans*108/100==N:
    print(math.floor(kari))
elif math.floor(hako*108/100)==N:
    print(hako)
elif math.floor(ans*108/100)==N:
    print(ans)
#elif math.ceil(hako*108/100)==N:
 #   print(hako)
#elif math.ceil(ans*108/100)==N:
 #   print(ans)
else:
    print(":(")

Submission status: Accepted

Solution code:
def kei(x):
    return int(x*1.08)


n=int(input())

kiri=int(n/1.08)

if(kei(kiri)==n):
    print(kiri)
elif(kei(kiri+1)==n):
    print(kiri+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = ":("
for i in range(1, n+1):
    v = math.floor(i * 1.08)
    if v == n:
        ans = i
        break

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int):
    
    for i in range(1, 50000):
        if i*1.08//1 == N:
            print(i)
            exit()
        
    print(':(')



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
# X * 1.08 // 1.0  = Nとなる. X = N/1.08
# Xは1.08をかけたあとでNになる可能性のあるもので最も小さいもの,Nを1.08で割ったものを切り上げる
X = N/1.08
if int(X)*1.08==N:
    X=int(N/1.08)
else: 
    X=int(N/1.08) + 1
# Xでも大きすぎた場合(1.08を掛けるとNを超える場合)
if X * 1.08 >= N+1:
    print(":(")
else:
    print(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = float(input())
y = N/1.08 #すべて
x = int(y) #整数の箇所のみ(int)
z = float(x) #整数の箇所のみ(float)
flag=y-z
p=1/1.08
if flag==0:
 print(x)
elif flag+p > 1:
 print(x+1)
else:
 print(':(')

Submission status: Accepted

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

tax = 1.08
n = N // tax

if math.floor((n) * tax) == N:
    print(int(n))
else:
    while 1:
        if math.floor(n * tax) == N:
            print(int(n))
            break
        elif math.floor(n * tax) < N:
            n += 1
        elif math.floor(n * tax) > N:
            print(":(")
            break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int( input())
# m2, d2 = map(int, input().split())

x = n / 1.08
x_decimal = x - int(x)

ret = ':('
if x_decimal == 0.0:
    ret = str(int(x))
elif x_decimal > (8 / 108):
    ret = str(int(x + 1))
print(ret)

Submission status: Accepted

Solution code:
#入力
N=int(input())

ans= N / 1.08

if(ans % 1 !=0):
    ans= (ans //1)+1

#print("ans        =",ans)
#print("ans * 1.08 =",ans*1.08)

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

Submission status: Accepted

Solution code:
n = int(input())
left = n / 1.08 
right = (n+1) / 1.08
if right == int(right):
    right = int(right) - 1
else:
    right = int(right)

if left == int(left):
    left = int(left)
else:
    left = int(left) + 1

if left <= right:
    print(left)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

ans = 0

for i in range(100):
    val = 100 * n + i
    if val % 108 == 0:
        ans = val // 108
        break
    else:
        pass

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

n1 = int(-(-n // 1.08))
if int(n1* 1.08) == n:
    print(n1)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if n == y:
    print(x)
else:
    print(':(')

Submission status: Accepted

Solution code:
N=int(input())
X_max=int((N+1)//1.08)
X_min=int(-(-(N//1.08)))

if int(X_max*1.08)==N:
	print(X_max)
elif int(X_min*1.08)==N:
	print(X_min)
else:
	print(':(')

Submission status: Accepted

Solution code:
N = int(input())
f = True
for i in range(int((N-1)/1.08),int(N/1.08)+2):
    X = int(i*1.08)
    if X == N:
        print(i)
        f = False
        break
if f:
    print(":(")

Submission status: Accepted

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

if X % 1 == 0:
    print(int(X))
elif int(N_new) == N or int(N_new_2) == N:
    print(int(X)+1)
          
else:
    print(":(")

Submission status: Accepted

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

no_tax = n / 1.08

no_tax = math.floor(no_tax)

l = [no_tax-1,no_tax,no_tax+1]

for i in l:
    if n == math.floor(i*1.08):
        print(math.floor(i))
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
import math 
import sys

N = int(input())

n = math.floor(N/1.08)

while n * 1.08 <= N+1:
    #print(n)
    if math.floor(n*1.08) == N:
        print(n)
        sys.exit()
    else:
        n += 1
print(':(')

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))[0]

a = float(N) / 1.08
# a = N / 1.08
# print(a)

result = ":("
for i in range(3):
    b = int(a) + i
    c = b * 1.08
    d = int(c)
    # print(i, b, c, d)
    if d == N:
        result = str(b)

print(result)

Submission status: Accepted

Solution code:
import math
n = int(input())
b=n/1.08
#print(b)
a=math.ceil(b)
#print(a)
if a-b>0.9:
  print(":(")
else:
  print(a)

Submission status: Accepted

Solution code:
import math
a=int(input())
b=round(a/1.08)
c=math.floor(b*1.08)
d=math.floor((b-1)*1.08)
e=math.floor((b+1)*1.08)

if a==c:
  print(b)
else:
  if a==d:
    print(b-1)
  elif a==e:
    print(b+1)
  else:
  	print(':(')

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
  
N = int(input())
a = N / 1.08
if is_integer_num(a) == True:
  print(int(a))
else:
  a = int(a)
  b = a+1
  
  n = int(a * 1.08)
  m = int(b * 1.08)
  
  if n == N:
    print(a)
  elif m == N:
    print(b)
  else:
    print(":(")

Submission status: Accepted

Solution code:
import math
import sys

N = int(input())

X = 50000

for i in range(X):
    if math.floor(i*1.08) == N:
        print(i)
        sys.exit()
    else:
        continue
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

X = -1
for i in range(50000):
    if i*108//100 == N:
        X = i
        break

if X == -1:
    print(':(')
else:
    print(X)

Submission status: Accepted

Solution code:
n = int(input())
lst = []
for i in range(50001) :
    lst += [int(i*1.08)]

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

else :
    print(":(")

Submission status: Accepted

Solution code:
import math

N=int(input())

X = N / 1.08
X = math.ceil(X)

N2 = X * 1.08
N2 = math.floor(N2)

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

Submission status: Accepted

Solution code:
# B - Tax Rate
import math
N = int(input())
tmp = round(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(":(")

Submission status: Accepted

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

X = N // 1.08
Xminus = X - 1
Xplus = X + 1

X_list = [X, Xplus, Xminus]
# print(X_list)
flug = False

for x in X_list:
#     print(x * 1.08)
    if int(x * 1.08) == N:
        print(int(x))
        flug = True
        break

if flug == False:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor
n = int(input())
tmp = floor(n / 1.08)
while floor(tmp * 1.08) <= n:
  if floor(tmp * 1.08) == n:
    print(tmp)
    exit()
  else:
    tmp += 1
print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

x = int(n//1.08)


while True:
    if int(x*1.08) == n:
        ans = x
        break
    
    x += 1
    
    if int(x*1.08) > n:
        ans = ':('
        break
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N=int(input())

X =round(N / 1.08)

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

Submission status: Accepted

Solution code:
def value(x): return x*108//100
def bsearch(V,x_min,x_max):
    if x_max - x_min == 1: print(":(")
    else:
      x = (x_min + x_max) // 2
      v = value(x)
      if V>v: return bsearch(V,x, x_max)
      elif V<v: return bsearch(V,x_min,x)
      else: print(x)

N = int(input())
bsearch(N, 0,50000)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

if(N*100 % 108 == 0):
  Xmin = int(N*100/108)
else:
  Xmin = int(N*100/108)+1

if((N+1)*100 % 108 == 0):
  Xmax = int((N+1)*100/108)-1
else:
  Xmax = int((N+1)*100/108)

if(Xmax >= Xmin):
  print(Xmin)
else:
  print(':(')

Submission status: Accepted

Solution code:
N=int(input())

def sol(n):
    for i in range(1,n+1):
        t=i*1.08
        if(int(t)==n):
            return i
    return ":("

print(sol(N))

Submission status: Accepted

Solution code:
import math

N = int(input())*100

x=N//108

if (math.floor(x*108/100)==N/100):
  print('{:.0f}'.format(x))
elif (math.floor((x+1)*108/100)==N/100):
  print('{:.0f}'.format(x+1))
else:
  print(":(")

Submission status: Accepted

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

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

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:
# coding: utf-8
# Your code here!

N = int(input())
num1 = int(N / 1.08)
num2 = int(num1 * 1.08)
num3 = int((num1 + 1) * 1.08)
if N == num2:
  print(num1)
elif N == num3:
  print(num1 + 1)
else:
  print(':(')

Submission status: Accepted

Solution code:
# 2019/12/1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
input = int(stdin.readline().rstrip())

orig = input/1.08

ceil = math.ceil(orig)
floor = math.floor(orig)

if orig == ceil and orig == floor:
    print(int(orig))
elif int(math.floor(ceil) * 1.08) == input:
    print(int(ceil))
elif int(math.floor(floor * 1.08)) == input:
    print(int(floor))
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
ok = False
for i in range(n,0,-1):
    if math.floor(i*1.08)==n:
        print(i)
        ok = True
        break
if ok==False:
    print(":(")

Submission status: Accepted

Solution code:
N=int(input())



flag=False
for i in range(N+1):
    if int(i*1.08)==N:
        print(i)
        flag=True
        break

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

Submission status: Accepted

Solution code:
N = int(input())

a = N/1.08
X = a*10//10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
flag = False
x = int(n / 108 * 100)
for i in range(x-5,x+5):
    if int(i*1.08) == n:
        flag = True
        x = i
if flag:
    print(x)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor, ceil

n = int(input())
tax = 1.08

x_kari = ceil(n/tax)

n_kari = floor(x_kari*tax)

if n == n_kari:
	print(x_kari)
else:
	print(':(')

Submission status: Accepted

Solution code:
N = int(input())

ans1 = N / 1.08
N2 = int(ans1) * 1.08
ans2 = int(ans1) + 1
N3 = int(ans2) * 1.08

if int(N2) == N:
    print(int(ans1))
elif int(N3) == N:
    print(int(ans2))
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n1 = int(input())
n =  n1 * 100
x1 = (n // 108)
x2 = -(-n // 108)
if x1*108//100 == n1:
    print(x1)
    exit(0)
if x2*108//100 == n1:
    print(x2)
    exit(0)
print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8
from decimal import Decimal, ROUND_DOWN, ROUND_UP


def solve(*args: str) -> str:
    n = Decimal(args[0])
    rate = Decimal(1.08)
    x_u = (n/rate).quantize(Decimal('0'), rounding=ROUND_UP)
    x_d = (n/rate).quantize(Decimal('0'), rounding=ROUND_DOWN)

    ret = ''
    if x_u == x_d:
        ret = str(x_u)
    elif (x_u*rate).quantize(Decimal('0'), rounding=ROUND_DOWN) == n:
        ret = str(x_u)
    elif (x_d*rate).quantize(Decimal('0'), rounding=ROUND_DOWN) == n:
        ret = str(x_d)
    else:
        ret = ':('

    return ret


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
import math
n = int(input())
a = math.floor(n / 1.08)
b = a + 1
c = math.floor(a * 1.08)
d = math.floor(b * 1.08)

if c == n:
  print(a)
elif d == n:
  print(b)
else:
  print(":(")

Submission status: Accepted

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

inta = int(a)
if inta==a:
    print(inta)
elif inta==int(b) or (int(b)==b and inta+1==int(b)):
    print(':(')
else:
    print(inta+1)

Submission status: Accepted

Solution code:
import math

N = int(input())

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

if(A.is_integer()):
    print(math.floor(A))
else:
    if(B.is_integer()):
        print(":(")
    else:
        if(math.floor(A) == math.floor(B)):
            print(":(")
        else:
            print(math.floor(B))

Submission status: Accepted

Solution code:
N=int(input())
A=[]
for i in range(50001):
  A.append(int(i*1.08//1))
if N in A:
  print(int((N+0.99)/1.08))
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

n = int(input())

x = n / 1.08
x1 = round(x, 0)

n1 = m.floor(x1 * 1.08)
n2 = m.floor((x1+1) * 1.08)

# print('x',x, 'x1', x1, 'n1', n1,'n2', n2)

if x == x1:
    print(int(x))
elif n1 == n:
    print(int(x1))
elif n2 == n:
    print(int(x1+1))
elif n1 < n < n2:
    print(':(')

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7


def main():
    n = int(input())
    v = math.ceil(n / 1.08)
    vv = v * 1.08
    #print(v,vv)
    if n == math.floor(vv):
        print(v)
    else:
        print(":(")


    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
n = int(input())
a = round(n / 1.08)
c = a + 1
b = int(a *1.08)
d = int(c *1.08)
if b == n:
    print(a)
elif d == n:
    print(c)
else:
    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)
    break
else:
  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)
else:
  print(':(')

Submission status: Accepted

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

for i in range(Z,Z+2):
    if N/1.08 <= i < (N+1)/1.08:
        if int(N/1.08) == int((N+1)/1.08):
            print(Z)
            break
        else:
            print(Z+1)
            break
else:
    print(":(")