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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if o == N:
    print(int(p))
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import math
import sys

N = int(input())

X = 5000

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = -1
for X in range(1, N):
    if str(X*108)[:-2]==str(N): ans = X

print(ans if ans>-1 else ':(')

Submission status: Wrong Answer

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

#N = N//1.08

i=1
X=0

while 1:
   X = math.floor(i*1.08)
   if X == N:
      print (i)
      break

   if X > N:
      print (":)")
      break
   i = i + 1

#print (N)
#print ('{:.0f}'.format(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
x = int(round(N/(1.08)))

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

Submission status: Wrong Answer

Solution code:
N = int(input())

price = N/1.08
price_str = str(N/1.08)
lst = list(price_str.split(".")[1])


if lst[0] == "0":
    print(":(")
else:
    print(round(price))

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(100/108.0 * a)
result = ":("
for x in range(5):
  c = int((b-(x-2))*1.08)
  if a == c:
    result = b-(x-1)
    break
print(result)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
ans = -1
for x in range(int(N//1.09), N):
    if math.floor(x * 1.08) == N:
        ans = x
        break
print(ans if ans is not -1 else ':(')

Submission status: Wrong Answer

Solution code:
n = int(input())

x = n / 1.08
if x%1 == 0:
  print(int(x))
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
m_round=lambda x:(x*2+1)//2
x1=n/1.080
x2=m_round(x1)
y=math.floor(x2*1.080)
if(n ==  y):
  print(int(x2))
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
Answer = ':('
if N < 200:
  for i in range(N):
    if math.floor(i*1.08)==N:
      Answer = i
else:
  for i in range(N//120,N+1000):
    if math.floor(i*1.08)==N:
      Answer = i
print(Answer)

Submission status: Wrong Answer

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
  
  a = int(a * 1.08)
  b = int(b * 1.08)
  
  if a == N:
    print(a)
  elif b == N:
    print(b)
  else:
    print(":(")

Submission status: Wrong Answer

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)
if fromPrice >= minPrice and fromPrice <= maxPrice:
    print(fromPrice)
elif toPrice >= minPrice and toPrice <= maxPrice:
    print(toPrice)
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n=int(input())

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

x =n/1.08

x = round(x)
n1 = math.floor(x * 1.08)

if n1 == n:
    print(round(x))
else:
    print(":(")

Submission status: Wrong Answer

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(n+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if (n*100 // 108) == (n*100 / 108):
  print((n*100 // 108))
else:
  print(':(')

Submission status: Wrong Answer

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

while X<N:
    check=int(X)*1.08
    if check//1==N:
        print(int(X))
        count=1
        break
    count=0
    X=X+1
if count!=1:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

if o == N:
    print(p)
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
import math

N=int(input())

X =round(N / 1.08)

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

Submission status: Wrong Answer

Solution code:
import math
 
n = int(input())
answers = []
 
for i in range(n):
  if math.floor(i * 1.08) == n:
    answers.append(i)
    break

if len(answers) == 0:
  print(':(')
else:
  print(answers[-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import decimal

N=int(input())

def sol(n):
    for i in range(1,n):
        t=i*1.08
        tmp=decimal.Decimal(t)
        out=tmp.quantize(decimal.Decimal('0.1'), rounding=decimal.ROUND_FLOOR)
        if(out==n):
            return i
    return ":("

print(sol(N))

Submission status: Wrong Answer

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(d)
  elif a==e:
    print(e)
  else:
  	print(':(')

Submission status: Wrong Answer

Solution code:
import math

N=432

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: Wrong Answer

Solution code:
import math
N = int(input())
nuki = int(N/1.08)
for i in range(nuki-5000,N):
    if math.floor(i*1.08) == N:
        print(i)
        exit()
print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())



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

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
# B - Tax Rate
import math
N = int(input())
tmp = round(N / 1.08)
if N == 1:
    print(":)")
elif math.floor(tmp * 1.08) == N:
    print(int(tmp))
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())

#N = N//1.08

i=1
X=0

while 1:
   X = int(i*1.08)
   if X == N:
      print (i)
      break

   if X > N:
      print (":)")
      break
   i = i + 1

#print (N)
#print ('{:.0f}'.format(N))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

  
print(':(')

Submission status: Wrong Answer

Solution code:
import math

n=int(input())

x=n/1.08

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

Submission status: Wrong Answer

Solution code:
N = int(input())

price = N/1.08
price_str = str(N/1.08)
lst = list(price_str.split(".")[1])

if lst[0] == 0:
    print(":(")
else:
    print(round(price))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = ((n + 1) % 27)
b = ((n + 14) % 27)

if a == 0 or b == 0:
    print(":(")
else:
    print(round(n/1.08))

Submission status: Wrong Answer

Solution code:
N = int(input())

#N = N//1.08

i=1
X=0

while 1:
   X = int(i*1.08)
   if X == N:
      print (i)
      break

   if X-1 > N:
      print (":)")
      break
   i = i + 1

#print (N)
#print ('{:.0f}'.format(N))

Submission status: Wrong Answer

Solution code:
N=int(input())
M=round(N/1.08)


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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 100 * n
result = ':('
for i in range(-50, 50):
	b = a + i
	c = b % 108
	if c == 0:
		result = str(b//100)
		break
print(result)

Submission status: Wrong Answer

Solution code:
import math

teika = input()
int_teika = int(teika)

int_motone = round(int_teika*100/108)
int_compared_motone = math.ceil(int_teika*100/108)

if int_motone == int_compared_motone:
  print(str(int_motone))
else:
  print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = n/1.08
print(int(x) if float.is_integer(x) else ':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = 0
ans = 0

for i in range(100):
    x = 100 * n + i
    print(x)
    if x % 108 == 0:
        flag = 1
        ans = x
        break
    else:
        pass

print(ans // 108) if flag == 1 else print(':(')

Submission status: Wrong Answer

Solution code:
s = input().split()
n=int(s[0])
x=n/1.08

if len(str(x))!=16:
    print(int(x))
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
# 2019/12/1
from decimal import *

n=int(input())
res=Decimal(str(n/1.08)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
print(res if int(int(res)*1.08)==n else ':(')

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
round=lambda x:(x*2+1)//2
x1=n/1.08
x2=round(x1)
y=math.floor(x2*1.08)
if(n ==  y):
  print(int(x2))
elif(n !=y):
  print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 b == d:
  print(b)
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
N=int(input())
X_max=int((N+1/2)//1.08)-1
X_min=int(-(-(N-1+1/2)//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: Wrong Answer

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 = ''
    print(x_u, x_d)
    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: Wrong Answer

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

  
print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X= int(input())
tax=1.08

print(round(X/tax))

Submission status: Wrong Answer

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 or d == n:
    print(a)
else:
    print(':(')

Submission status: Wrong Answer

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 inta+1==int(b):
    print(':(')
else:
    print(inta+1)

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1, 50001):
    t = int(i * 1.08)
    if t == n:
        print(i)
        break
    else:
        continue
    print(":(")
    break

Submission status: Wrong Answer

Solution code:
N =int(input())

count = 0

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

Submission status: Wrong Answer

Solution code:
n = int(input())
m = round(n / 108 * 100)
if n == int(m*1.08):
    print(round(m))
else :
    print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans=round(n/1.08)
if(int(ans*1.08)!= n):
    if(int((ans+1)*1.08)!= n)&((int((ans-1)*1.08)!= n)):
        print(":(")
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 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: Wrong Answer

Solution code:
n=int(input())
if isinstance(n/1.08, int)==True:
    print(int(n//1.08))
elif round(n/1.08)==n//1.08+1:
    print(int(n//1.08)+1)
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
N=int(input())
X_max=int((N+1/2)//1.08)
X_min=int(-(-(N-1+1/2)//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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X = N / 1.08
if N % 1.08 >= 0.5 and N % 1.08 < 1.0:
    X = int(X) + 1
else:
    X = int(X)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a=int(input())
b=round(a/1.08)
c=math.floor(b*1.08)

if a==c:
  print(b)
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())

if a == int(int((a/1.08)+0.5)*1.08): 
    print(int((a/1.08)+0.5))
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import math
a=int(input())
m=a/1.08
s=a-m
if s==m*0.08:
    print(math.ceil(a/1.08))
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

x = int(n / 1.08)
if n <13:
    print(x+1)
    exit()

amari = n / 1.08 - x

if amari==0:
    print(x)
elif amari >=0.5:
    print(x+1)
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
n = int(input())
a = Decimal(str(n/1.08)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
if n in [0,1,2,3,4,5,6,7,8]:
    print(":(")
else:
    print(int(a) if int(int(a)*1.08) == n else ":(")

Submission status: Wrong Answer

Solution code:
import math

price = int(input())
ans = 0
f = False
for i in range(price):
    ans = math.floor(i * 1.08)
    if ans == price:
        ans = i
        f = True
        break
if f:
    print(ans)
else:
    print(":(")

Submission status: Wrong Answer

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

N1 = math.ceil(N / 1.08)
N2 = Decimal(N1 * 1.08).quantize(Decimal('0'), rounding=ROUND_HALF_UP)

if N == N2:
  print(N1)
else:
  print(":)")

Submission status: Wrong Answer

Solution code:
n = int(input())
import math
for i in range(n):
  if int(i * 1.08) == n:
    print(i)
    exit()
  elif math.ceil(i * 1.08) == n:
    print(i)
    exit()
   

  
print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n=int(input())
if isinstance(n/1.08, int)==True:
    print(n//1.08)
elif round(n/1.08)==n//1.08+1:
    print(n//1.08+1)
else:
    print(":(")

Submission status: Wrong Answer

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;

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

xmin = N / 1.08
xmax = (N + 1) / 1.08

if floor(xmin) == xmin:
	print(int(xmin))
elif floor(xmax) == xmax:
	print(int(xmax))
else:
	if floor(xmin) == floor(xmax):
		print(":(")
	if floor(xmin) + 1 == floor(xmax):
		print(floor(xmax))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
nuki = int(N/1.08)
for i in range(nuki-50,N):
    if math.floor(i*1.08) == N:
        print(i)
        exit()
print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
notax = round(N/1.08)
if int(notax*1.08)  != N:
    print(':(')
else:
    print(notax)

Submission status: Wrong Answer

Solution code:
N = int(input())*100

x=N/108
if (N)%108==0:
  print('{:.0f}'.format(x))
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
def tax(n) :
  x = (n*100)/108
  print(int(x))

Submission status: Wrong Answer

Solution code:
N=int(input())
M=round(N/1.08)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
M = int(N / 1.08)
count = 0
for i in range (0,10,1):
    M = M + int(i)-2

    if int(M*1.08) == N:
        print(round(M))
        count +=1
if count ==0:
    print(":(")

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
X = np.ceil(N / 1.08)
print(X)

Submission status: Wrong Answer

Solution code:
n = int(input())
m = int(round(n/1.08,0))
ct = int(m*0.08)

if m + ct == n :
    print (m)
else :
    print(":(")

Submission status: Wrong Answer

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

n1 = N / 1.08
print(n1)

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: Wrong Answer

Solution code:
N =int(input())

count = 0

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

Submission status: Wrong Answer

Solution code:
N = int(input())

X = int(N / 1.08)

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

Submission status: Wrong Answer

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, 1,50000)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Ans = N * 100 / 108
A = math.ceil(Ans)

if math.floor(A * 1.08) != A:
  print(':(')
else:
  print(A)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

x=N*100/108
print((N*100)%108)
if (N*100)%108==0:
  print('{:.0f}'.format(x))
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
n = int(input())
m = int(round(n/1.08,0))
ct = int(m*0.08)

if m + ct == n :
    print (m,ct)
else :
    print(":(")

Submission status: Wrong Answer

Solution code:
n = int(input())
from math import ceil, floor
aa = floor(n/1.08)
bb = floor(aa*1.08)
if n == bb:
  print(aa)
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())

X = int(N / 1.08)

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

if t == n:
  print(round(x))
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
N = int(input())

print(int((N + 1) / 1.08)
      if 100 * N % 108 == 0 or int(N / 1.08) + 1 == int((N + 1) / 1.08) else ':(')

Submission status: Wrong Answer

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):
        if math.floor(i*1.08)==N:
            print(i)
            exit()
    print(":(")
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

x=round(n/1.08)
y=math.floor(x*1.08)

if(n ==  y):
  print(int(x))
elif(n !=y):
  print(":(")

Submission status: Wrong Answer

Solution code:
import math

n = int(input()) * 100
x = round(n / 108)

if math.floor(x*1.08) == (n//100):
    print(x)
    exit(0)
print(":(")

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

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

Submission status: Wrong Answer

Solution code:
x = int(input())
flag = False
for i in range(x//105,x//105+2):
    ans = x - i * 100
    if ans <= 5 * i:
        flag = True
if flag:
    print(x)
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

n1 = N / 1.08

if round(n1)*1.08 == N:
    print(round(n1))
elif round(n1 + 1)*1.08 == N:
    print(round(n1 + 1))
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())

print(int((a/1.08)+0.5))

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

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

Submission status: Wrong Answer

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

N1 = math.ceil(N / 1.08)
N2 = round(N1 * 1.08)

if N == N2:
  print(N1)
else:
  print(":)")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n):
  if int(i * 1.08) == n:
    print(i)
    exit()
  elif n//1.08 == i:
    print(i)
    exit()

  
print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

for n in range(N):
    if n * 108 // 100 == N:
        print(n)
        exit()
print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import math

N =int(input())

X =N%1.08

if Decimal(str(X)).quantize(Decimal('0'), rounding=ROUND_HALF_UP) ==0:
    print(":(")
else:
    print(Decimal(str(N/1.08)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))

Submission status: Wrong Answer

Solution code:
N = int(input())

n1 = N / 1.08

if round(n1)*1.08 == N:
    print(n1)
elif round(n1 + 1)*1.08 == N:
    print(n1 + 1)
else:
    print(":(")

Submission status: Wrong Answer

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

if n == int(m*1.08+0.5):
  print(int(m+0.5))
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())

x = a / 1.08

print(round(x))

Submission status: Wrong Answer

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 or N_calc2==N:
    print(X)
else :
    print(":(")

Submission status: Wrong Answer

Solution code:
x = int(input())
flag = False
for i in range(x//105,x//105+2):
    ans = x - i * 100
    if ans <= 5 * i:
        flag = True
if flag:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

nums = {}

for w_tax in range(1, 50000+1):
    nums[w_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: Wrong Answer

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
n = int(input())
a = Decimal(str(n/1.08)).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
print(int(a) if int(int(a)*1.08) == n else ":(")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n):
  if int(i * 1.08) == n:
    print(i)
    exit()

  
print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math


N = int(input())

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

Submission status: Wrong Answer

Solution code:
def tax(n) :
  x = (n * 100)/108
  print(x)

Submission status: Wrong Answer

Solution code:
N = int(input()) 

C = N / 1.08
if C.is_integer():
  print(int(C))
else:
  print(":(")