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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin


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


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())


# Code

n = intput()

x = round(n / 1.08)


for t in range(x - 2, x + 3):
    if round(t * 1.08) == n:
        print(t)
        break
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())
for i in range(1,46293):
    d = int(i*1.08)
    if d==N:
        print(i)
        exit()
print(':(')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a,b=n/1.08,(n+1)/1.08
if int(b)-int(a)==0 and int(a)!=a:
    print(":(")
else:
    print(int(a)+(a!=int(a)))

Submission status: Wrong Answer

Solution code:
num = int(input())
p = num/1.08
if p.is_integer() == True:
  print(int(p))
else:
  print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys; readline = sys.stdin.readline
from collections import deque

k = ':('
R = 1.08
N = int(readline())


for i in range(N):
    if int(R * i) == N:
        print(i)
        exit(0)

print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

ans = 0
for i in range(n):
    if int(i*1.08)==n:
        ans = i
        break
print(ans) if ans!=0 else ':('

Submission status: Wrong Answer

Solution code:
n = int(input())

a = round(n / 1.08)
res = a + int(a * 0.08)
if n != res:
    print(':(')
else:
    print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

update = False
for X in range(N):
    if int(X*1.08) == N:
        update = True
        print(X)
        break
if not update:
    print(':(')

Submission status: Wrong Answer

Solution code:
from math import floor,ceil

N = int(input())

check = lambda x: floor(x*1.08) == N

print(ceil(N/1.08) if check(ceil(N/1.08)) else -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

flag = False
i = 0
for i in range(50001):
    if i * 1.08 == n:
        flag = True
        break

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

Submission status: Wrong Answer

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()
    for i in range(n):
        if int(i*1.08) == n:
            print(i)
            exit()
    print(":(")


        


main()

Submission status: Wrong Answer

Solution code:
N=int(input())
M = int(N/1.08)
if M*1.08 == N:
    print(M)
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
print(int(int(input())/1.08))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def solve() :
    for i in range(N) :
        if (i * 1.08) * 10 // 10 == N :
            return i
    
    return ':('
    
print(solve())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%1.08 == 0:
    print(N//1.08)
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    for i in range(N):
        if int(i*1.08)==N:
            print(i)
            exit()
    print(":(")
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%1.08 == 0:
    print(N/1.08)
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
N = int(input())
a = N * 100 / 108
if(a == int(a)):
    print(int(a))
else:
    print(":(")

Submission status: Time Limit Exceeded

Solution code:
# sumitb2019_b_bacha.py
N = int(input())
for i in range(10000000):
    if int(i*1.08) == N:
        print(i)
        exit()
print(":(")

Submission status: Time Limit Exceeded

Solution code:
import sys
N=int(input())
a=N//1.08
b=a*1.08
b=int(b)
if b==N:
  print(a)
  sys.exit()
while True:
  if b>N:
    a=a-1
    b=a*1.08
    b=int(b)
    if b<N:
      print(":(")
      sys.exit()
    elif b==N:
      print(a)
  elif  b<N:
    a=a+1
    b=a*1.08
    b=int(b)
    if b>N:
      print(":(")
      sys.exit()
    elif b==N:
      print(a)

Submission status: Time Limit Exceeded

Solution code:
import math
from decimal import Decimal
 
n = int(input())
 
if n == 0:
  print(':(')
else:
  for i in range(1, n):
    if math.floor(Decimal(str(i)) * Decimal("1.08")) == n:
      print(i)
      break
  else:
    while True:
      pass

Submission status: Accepted

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

X = N / 1.08

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

Submission status: Accepted

Solution code:
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    N = i_input()

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

    print(":(")
  
 
  
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
for n in range(100000):
    x = int(n*1.08)
    if N==x:
        print(n)
        exit()
    if x > N:
        break
print(':(')

Submission status: Accepted

Solution code:
n=int(input()) 
flag = False
for i in range(100*n,100*(n+1)):
  if i%108 == 0:
    x = int(i//108)
    print(x)
    flag = True
    break
if flag == False:
  print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
x = int(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:
from math import floor
N = int(input())
Flag = False
for X in range(1,46300):
    if floor(X*1.08)==N:
        Flag = True
        break
print([':(',X][Flag])

Submission status: Accepted

Solution code:
from sys import stdin, stdout

def print(x):
    stdout.write(str(x))

def solve():
    n = int(stdin.readline())
    x = n * 100 // 108
    if x * 108 // 100 == n: 
        print(x)
    elif (x+1) * 108 // 100 == n:
        print(x + 1)
    else:
        print(":(")

def main():
    solve()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

n = int(input())
for i in range(n+1):
    if math.floor(i * 1.08) == n:
        print(i)
        exit(0)
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
x = (N+1) * 100 // 108
if x * 108 // 100 == N:
  print(x)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

for x in range(N,0,-1):
    val = int(x * 1.08)
    if val == N:
        print(x)
        exit()

print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
S = math.ceil(N / 1.08)
if S * 1.08 <= N - 1 or S * 1.08 >= N + 1:
  print(":(")
else:
  print(S)

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())
X=int(N//1.08)
n1=int(X*1.08)
n2=int((X+1)*1.08)
if n1==N:
    print(X)
elif n2==N:
    print(X+1)
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7
import math
n = I()

# N円払った
# 8パーセントの消費税がかかる
# 税抜き価格xを忘れたので、求めたい。
# xは整数とする。
# あり得る価格のうち一つを出力せよ。ただし考えられるものが存在しない場合はその旨を報告せよ。

# 普通に考えたら、n / 1.08が原価
# ただし、消費税は切り捨てとなる点に注意が必要。

x = n / 1.08
c_x = math.ceil(x)

f_n = math.floor(c_x * 1.08)

if f_n == n:
    print(c_x)
else:
    print(":(")

Submission status: Accepted

Solution code:
from decimal import Decimal
N = int(input())
a = Decimal('1.08')
for x in range(N+1):
    if int(x*a) == N:
        print(x)
        exit()

print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
raw = math.ceil(N / 1.08)
check = raw * 1.08

if int(check) == N:
  print(raw)
else :
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

p2 = (n + 1) / 1.08
p1 = n / 1.08
if p2 > int(p2) >= p1:
    print(int(p2))
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/local/bin/python3
# https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_b

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

n = int(input())
f = math.floor(n / 1.08)
c = math.ceil(n / 1.08)
for i in [f, c]:
    if math.floor(i*1.08) == n:
        print(i)
        exit()
print(':(')

Submission status: Accepted

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

np = ":("

def solve(N: int):
    ans = math.ceil(N/ 108 * 100)
    if math.floor(ans * 1.08) != N:
        print(np)
    else:
        print(ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
def resolve():
    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(":(")
resolve()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

def binary_search(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return ok

candidate = binary_search(n, 0, lambda x: x * 1.08 >= n)
if n == int(candidate * 1.08):
    print(candidate)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
flg = False
for i in range(1, n+1):
  x = int(i*1.08)
  if x == n:
    print(i)
    flg = True
    break
if not flg:
  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

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

    for i in range(50001):
        if int(i * 1.08) == N:
            ans = i
            break

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#
# smbc2019 b
#
import sys
from io import StringIO
import unittest
import math


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """432"""
        output = """400"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """1079"""
        output = """:("""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """1001"""
        output = """927"""
        self.assertIO(input, output)


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

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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = math.ceil(n/1.08) 
if n != math.floor(ans*1.08):
    print(r':(')
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

import decimal

def main():
    tax = decimal.Decimal('1.08')
    n = int(input())

    for i in range(1,n+1):
        if int(i*tax)==n:
            print(i)
            exit()
        else:
            continue
    print(":(")

if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

r = n % 27
if r == 13 or r == 26:
    print(':(')
elif r ==0:
    x = int(100*n/108)
    print(x)
else:
    for i in range(1, 25):
        if 1.08*(i-1) < r <= 1.08*i:
            break
    x = int(100*(n - i)/108) + i
    print(x)

Submission status: Accepted

Solution code:
from decimal import *

N = int(input())

X = (N / Decimal('1.08')).quantize(Decimal('0'), rounding=ROUND_UP)
if int(X * Decimal('1.08')) == N:
    print(int(X))
else:
    print(':(')

Submission status: Accepted

Solution code:
N=int(input())

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

if all(int(i*1.08)!=N for i in range(N+1))==True:
    print(":(")

Submission status: Accepted

Solution code:
# B - Tax Rate
N = int(input())
ans = ':('
for x in range(50000):
    if (108*x)//100==N:
        ans = x
        break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N=int(input())

for i in range(1,N+1):
  if (i*108)//100==N:
    print(i)
    exit()

print(':(')

Submission status: Accepted

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

ans_bool = False
ans_num = 0

for i in range(1, n+1):
    if math.floor(i * 1.08) == n:
        ans_bool = True
        ans_num = i
    else:
        pass
if ans_bool:
    print(ans_num)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = -1

for i in range(1, n+1):
    if math.floor(i * 1.08) == n:
        ans = i

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    def solve():
        for i in range(100001):
            cur = i * 108 // 100
            if cur == N:
                return i
        return ":("

    print(solve())


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# 三井住友信託銀行プログラミングコンテスト2019: B – Tax Rate
N = int(input())

X = int(N / 1.08)
X_min = int(X * 1.08)
X_max = int((X + 1) * 1.08)

if X_min == N:
    print(X)
elif X_max == N:
    print(X + 1)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
can = False
for i in range(1, n + 1):
    x = int(i * 1.08)
    if(x == n):
        print(i)
        can = True
        break
if(can == False):
    print(":(")

Submission status: Accepted

Solution code:
from math import ceil,floor
N=int(input())
K=ceil(N/1.08)
if floor((K-1)*1.08)==N:
  print(K-1)
if floor(K*1.08)==N:
  print(K)
else:
  print(':(')

Submission status: Accepted

Solution code:
x = int(input())

b = int(x/1.08)
x1 = int(b*1.08)
x2 = int((b+1)*1.08)

if x1 == x:
  print(b)
elif x2 == x:
  print(b+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
from sys import stdin
from math import ceil, floor
n=int(stdin.readline().rstrip())
min_ = n/1.08
max_ = (n+1)/1.08
if float(max_).is_integer():
    if ceil(min_) == floor(max_)-1:
        print(ceil(min_))
    else:
        print(":(")
else:
    if ceil(min_) == floor(max_):
        print(ceil(min_))
    else:
        print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
ret_just = math.floor(n/1.08)
ret_minus1 = ret_just - 1
ret_plus1 = ret_just + 1

if math.floor(ret_just*1.08) == n:
    print(ret_just)
elif math.floor(ret_minus1*1.08) == n:
    print(ret_minus1)
elif math.floor(ret_plus1*1.08) == n:
    print(ret_plus1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)

Submission status: Accepted

Solution code:
import math


n = int(input())
o = n / 1.080

o_floor = math.floor(o)
o_ceil = math.ceil(o)

if math.floor(o_floor * 1.08) == n:
    print(o_floor)

elif math.floor(o_ceil * 1.08) == n:
    print(o_ceil)

else:
    print(':(')

Submission status: Accepted

Solution code:
import math


n = int(input())
o = n / 1.080

o_floor = math.floor(o)
o_ceil = math.ceil(o)

if math.floor(o_floor * 1.08) == n:
    print(o_floor)

elif math.floor(o_ceil * 1.08) == n:
    print(o_ceil)

else:
    print(':(')

Submission status: Accepted

Solution code:
import math as m

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    N = int(input())
    for x in range(60000):
        if int(x * 1.08) == N:
            print(x)
            return

    print(":(")
    return


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
Y = int(N/1.08)
a = Y
b = Y+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())

for x in range(50000):
    if x * 108 // 100 == N:
        print(x)
        break
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input(""))
ans = int(N/1.08)-1
f = 0
while ans < (N/1.08)+1:
    if int(ans*1.08) == N:
        print(ans)
        f += 1
    ans += 1
if f == 0:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
from math import ceil


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

    min_value = n * 100 / 108
    max_value = (n + 1) * 100 / 108

    candidate = ceil(min_value)

    if candidate < max_value:
        print(candidate)
    else:
        print(":(")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
n = float(input())
m_low = math.ceil(n / 1.08)
m_high = math.floor((n+1)/1.08)
if m_low > m_high:
  print(':(')
else:
  ch_low = math.floor(m_low*1.08)
  ch_high = math.floor(m_high*1.08)
  if ch_low == int(n):
    print(m_low)
  elif ch_high == int(n):
    print(m_high)
  else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
X = N // 1.08
result1 = int(X) * 1.08
result2 = (int(X)+1) * 1.08
result3 = (int(X)-1) * 1.08

if int(result1) == N:
  result = int(X)
elif int(result2) == N:
  result = int(X) + 1
elif int(result3) == N:
  result = int(X) -1
else:
  result = ':('

print(result)

Submission status: Accepted

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

while n <= N:
    if int(n * 1.08) == N:
        print(n)
        exit()

    n += 1

print(':(')

Submission status: Accepted

Solution code:
a=int(input())
b=0
for i in range(a+1):
  c=i
  c+=(i*8)//100
  if c==a:
    b=i
print(":("if b==0 else b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

without_tax = float(n/1.08)
without_tax_floor = math.floor(without_tax)
without_tax_ceil = math.ceil(without_tax)

if math.floor(without_tax_floor * 1.08) == n:
    print(without_tax_floor)
elif math.floor(without_tax_ceil * 1.08) == n:
    print(without_tax_ceil)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = int(n / 1.1)
while True:
  if math.floor(ans * 1.08) == n:
    break
  ans += 1
  
  if ans > n:
    break
if ans > n:
  print(':(')
else:
  print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = int(n//1.08)
for x in range(a, a+2):
  if x < (n + 1)/1.08 and x >= n/1.08:
    print(x)
    exit()
print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""Boot-camp-for-Beginners_Easy004_B_Tax-Rate_25-August-2020.py"""
import numpy as np
import sys

N=int(input())
X=N/1.08
if int(int(np.ceil(X))*1.08)==N:
    print(int(np.ceil(X)))
else:
    print(":(")

Submission status: Accepted

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

min = N/1.08
max = (N+1)/1.08

candidate = math.ceil(min)
if candidate >= max:
    print(':(')
else:
    print(candidate)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = float(input())
a = math.floor(n/1.08)
x = []
if math.floor((a)*1.08) == n:
  print(a)
elif math.floor((a+1)*1.08) == n:
  print(a+1)
elif math.floor((a+2)*1.08) == n:
  print(a+2)
elif math.floor((a+3)*1.08) == n:
  print(a+3)
elif math.floor((a-1)*1.08) == n:
  print(a-1)
else:
  print(":(")