Problem:


Score: 200 points

Problem Statement

Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid N yen (the currency of Japan) for it.

The consumption tax rate for foods in this shop is 8 percent. That is, to buy an apple pie priced at X yen before tax, you have to pay X \times 1.08 yen (rounded down to the nearest integer).

Takahashi forgot the price of his apple pie before tax, X, and wants to know it again. Write a program that takes N as input and finds X. We assume X is an integer.

If there are multiple possible values for X, find any one of them. Also, Takahashi's memory of N, the amount he paid, may be incorrect. If no value could be X, report that fact.

Constraints

1 \leq N \leq 50000

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If there are values that could be X, the price of the apple pie before tax, print any one of them.

If there are multiple such values, printing any one of them will be accepted.

If no value could be X, print :(.

Sample Input 1

432

Sample Output 1

400

If the apple pie is priced at 400 yen before tax, you have to pay 400 \times 1.08 = 432 yen to buy one.

Otherwise, the amount you have to pay will not be 432 yen.

Sample Input 2

1079

Sample Output 2

:(

There is no possible price before tax for which you have to pay 1079 yen with tax.

Sample Input 3

1001

Sample Output 3

927

If the apple pie is priced 927 yen before tax, by rounding down 927 \times 1.08 = 1001.16, you have to pay 1001 yen.



Sample input:
432


Sample output:
400

Submission status: Accepted

Solution code:
import math
N = int(input())
tax = 1.08
p0 = N / tax
p1 = (N+1) / tax
p = math.ceil(p0)
if p < p1:
    print(p)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

n = int(input())

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

if int(x * 1.08) == n:
    print(x)

else:
    print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
x_down = math.floor(n/1.08)
x_up = math.ceil(n/1.08)

if math.floor(x_down*1.08) == n:
    print(x_down)
elif math.floor(x_up*1.08) == n:
    print(x_up)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
n=int(input())
xx=math.floor(n/1.08)

ans=[]
for i in range(xx-10,xx+10):
    if math.floor(i *1.08) ==n:
        ans.append(i)
if len(ans)==0:
    print(":(")
else:
    print(ans[0])

Submission status: Accepted

Solution code:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

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

Submission status: Accepted

Solution code:
import math

N = int(input())
tmp1 = math.ceil(N / 1.08)
tmp2 = int(tmp1 * 1.08)

if N == tmp2:
    print(tmp1)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
n = N / 1.08

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

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor
def main():
    n = int(sys.stdin.readline().rstrip())
    x = ceil(n * 100 / 108) 
    if floor(x * 1.08) == n:
        print(x)
    else:
        print(':(')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

N = I()

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

Submission status: Accepted

Solution code:
n = int(input())
x = 0
while True:
    if x > n:
        res = ':('
        break

    if int(x*1.08)==n:
        res = x
        break

    x += 1

print(res)

Submission status: Accepted

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


x = math.ceil(n/1.08)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

m = int(n // 1.08)

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

Submission status: Accepted

Solution code:
N=input()

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

Submission status: Accepted

Solution code:
import sys
import math

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    ans = int(math.floor(n / 1.08))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

    for i in range(int(N/1.1),N+1):
        if int(i*1.08)==N:
            print(i)
            return 0
    else:
        print(':(')



if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
for x in range(1, 2 * n):
    if x * 108 // 100 == n:
        print(x)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

x = n / 1.08

if x == x // 1:
    print(int(x))

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

Submission status: Accepted

Solution code:
n = int(input())
import numpy as np
X = np.ceil(n / 1.08)
if int(X*1.08)==n:
    print(int(X)) 
elif int((X-1)*1.08)==n:
    print(int(X-1))
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

ans = ":("
for i in range(1, 50001):
    tmp = i * 1.08
    tmp = int(tmp)
    if n == tmp:
        ans = i
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor

n = int(input())

bl = False
for x in range(1, 60000):
    if floor(x * 1.08) == n:
        bl = True
        break

print(x if bl else ":(")

Submission status: Accepted

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

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

Submission status: Accepted

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

a = math.floor(n/1.08)
b = math.floor(n/1.08) + 1

if math.floor(a*1.08) == n:
    print(a)
elif math.floor(b*1.08) == n:
    print(b)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
res=0
for i in range(1,50000):
    if int(i*1.08)==n:
        res=i
        break
print(res if res>0 else ':(')

Submission status: Accepted

Solution code:
N = int(input())

i = 1
while True:
    if int(i * 1.08) == N:
        break
    if i > N:
        i = 0
        break
    i += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N  = int(input())
x = int(N*100/108)
s = True
for i in range(max(0,x-13),x+13):
    if int(i*1.08)==N:
        print(i)
        s =False
        break
if s:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

def solve():
    for i in range(1,n+1):
        if i * 1.08 >= n and i * 1.08 < n + 1:
            return i
    return ":("

print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
def main():
    N = int(input())
    ans = 0
    for x in range(50000):
        x += 1
        if np.floor(x * 1.08) == N:
            ans = x
            break
        if x == 50000 and ans == 0:
            ans = ":("
    
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

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

    ans = ":("
    for x in range(50000):
        tmp = x * 1.08
        tmp = math.floor(tmp)
        if tmp == N:
            ans = x 
            break
    
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import sys
import math

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    in_tax = int(inputs[0])
    not_tax = in_tax / 1.08
    kirisute = math.floor(not_tax)

    ks = [kirisute - 2, kirisute - 1, kirisute, kirisute + 1, kirisute + 2]
    for k in ks:
        c = math.floor(k * 1.08)
        if c == in_tax:
            return k
    return ':('


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
import sys
x = int(input())
a = int(x / 1.08)

for n in [a, a+1]:
    if (int(n * 1.08) == x):
        print(n)
        sys.exit()

print(':(')

Submission status: Accepted

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

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

print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor, ceil
n = int(input())
x = floor(n / 1.08)
for i in range(-1,2):
    if floor((x+i) * 1.08) == n:
        print(x+i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"

inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    X=I()
    # print(int(math.ceil(X/1.08)))
    Y=int(math.ceil(X/1.08))
    if X==math.floor(Y*1.08):
        print(Y)
    else:
        print(":(")
        # math.floor()
    # print(A,B)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from math import ceil
n=int(input())
m=ceil(n/1.08)
M=int((n+1)/1.08)
if ((n+1)*100)%108==0:
  M-=1
if not m<=M:
  print(":(")
else:
  print(m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
# ans = ':('
for i in range(1, N+1):
    tmp = (i * 1.08) // 1
    if tmp == N:
        ans = i
        break
    elif tmp > N:
        ans = ':('
        break
print(ans)

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 sys
def input():
    return sys.stdin.readline()[:-1]
inf=float("inf")
n=int(input())
m=int(n/1.08)
if int(m*1.08)==n:
    print(m)
elif int((m+1)*1.08)==n:
    print(m+1)
else:
    print(":(")

Submission status: Accepted

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

X = N / 1.08
a = math.floor(X)
b = math.ceil(X)

if math.floor(a * 1.08) == N:
    print(a)
elif math.floor(b * 1.08) == N:
    print(b)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
import math

X = int(input())
def f(N):
    ret = int(math.floor(N*1.08))
    return ret

r = 5*10**4+1
l = 0
while (r-l)>1:
    mid = (r+l)//2
    ret = f(mid)
    if ret > X:
        r = mid
    elif ret == X:
        print(mid)
        exit()
    else:
        l = mid

print(":(")

Submission status: Accepted

Solution code:
n = int(input())
s = ":("
for i in range(50000):
    m = int(i*1.08)
    if (m == n):
        s = str(i)

print(s)

Submission status: Accepted

Solution code:
N = int(input())

for i in range(50000):
    if i * 108 //100 == N:
        print(i)
        exit(0)
print(':(')

Submission status: Accepted

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

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


    # calc


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if t:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = 0

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

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

Submission status: Accepted

Solution code:
import math

N = int(input())

x = 1
while x <= 50000:
    if math.floor(x*1.08) == N:
        print(x)
        break
    x += 1
else:
    print(":(")

Submission status: Accepted

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


def solve(N: int):
    M = N / 1.08
    K = (N+1) / 1.08
    for i in range(N+1):
        if M <= i < K:
            print(i)
            return
    print(":(")
    return


# Generated by 1.1.6 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:

N = int(input())

def solve(N):
    for i in range(N + 1):
        if int(i * 1.08) == N:
            return i
    return ":("
print(solve(N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

def nibu(l,r):
    if l > r:
        return ':('
    c = (l+r)//2
    if (c*1.08)//1 == N:
        return c
    if (c*1.08)//1 < N:
        return nibu(c+1,r)
    elif (c*1.08)//1 > N:
        return nibu(l,c-1)

print(nibu(0,100000))

Submission status: Accepted

Solution code:
N = int(input())

x = int((N + 1) / 1.08)
y = int(x * 1.08)

if N == y:
    print(x)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

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 = N // 1.08
Y = X + 1

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

Submission status: Accepted

Solution code:
#coding:utf-8
from collections import deque
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = True

def index(a,b):
    return str(min(a,b)) + "," +  str(max(a, b))

def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    n = II()

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

    print(":(")



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
X = int(N//1.08)
for i in range(X-2,X+3):
    if int(i*1.08) == N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

n=int(N/1.08)

if(N==n*1.08):
    print(n)
elif(N==int((n+1)*1.08)):
    print(n+1)
else:
    print(':(')

Submission status: Accepted

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

ans = math.floor(N / 1.08)

while True:
    if math.floor(ans * 1.08) > N:
        print(':(')
        exit()
    if math.floor(ans * 1.08) == N:
        print(ans)
        exit()
    else:
        ans += 1

Submission status: Accepted

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

ans1 = math.floor(n/1.08)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = (N*100 + 107) // 108

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
for x in range(1, 50001):
  if int(x * 1.08) == N:
    print(x)
    exit(0)
print(":(")

Submission status: Accepted

Solution code:
import sys


def main():
    # input = sys.stdin.readline
    paid = int(input())

    tax_rate = 1.08

    price = paid / tax_rate
    price = int(price + 0.9)

    if paid == int(price * tax_rate):
        print(price)
    else:
        print(':(')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

for n in range(100000):
    ans = int(n * 1.08)
    if ans == N:
        print(n)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
n=int(input())
a=n//1.08
a+=(n%1.08!=0)
if int(a*1.08)==n:
  print(int(a))
else:
  print(':(')

Submission status: Accepted

Solution code:
def examB():
    N = I()
    max_N = 50001
    origin = [None]*int(max_N*1.08+10)
    for i in range(max_N):
        origin[int(i*1.08)] = i
    if origin[N]:
        ans = origin[N]
    else:
        ans = ":("
    print(ans)
    return

def examC():
    return

def examD():
    return
def examE():
    return

def examF():
    return

import sys,copy,bisect,itertools,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = float(input())
import math
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())

ok = False
ans = 0
for i in range(1,50001):
    if int(i*1.08) == N:
        ans = i
        ok = True
if ok:
    print(ans)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
import math
for i in range(50000):
    val = math.floor(i * 1.08)
    if val == n:
        print(i)
        import sys
        sys.exit()
print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

X = N//1.08
for n in range(10):
    X += n
    if int(X*1.08) == N:
        print(int(X))
        exit(0)
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

X_low = N / 1.08
X_high = (N + 1) / 1.08

X = int(X_high - 0.001)

if X_low <= X < X_high:
    print(X)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

X = int(N / 1.08)

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

Submission status: Accepted

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


def main():
    N = int(input())
    for x in range(50000+1):
        if int(x*1.08) == N:
            print(x)
            return
    print(":(")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n+10):
    if floor(i * 1.08) == n:
        print(i)
        break
else: print(":(")

Submission status: Accepted

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

v = int(N / 1.08)
if int(v * 1.08) == N:
    print(v)
    sys.exit()
if int((v + 1) * 1.08) == N:
    print(v + 1)
    sys.exit()
print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

    x = int(N / 1.08)

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
mi=n/1.08
ma=(n+1)/1.08
x=np.ceil(mi)
if x<ma:
    print(int(x))
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
x = [int(i*1.08) for i in range(1, 50001)]
try:
    print(x.index(n)+1)
except:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

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

    for i in range(1,n+1):
        l=int(i*1.08)
        if l == n:
            print(i)
            return
    print(':(')
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans = int(n /  1.08)
if int(ans * 1.08) == n:
    print(ans)
elif int((ans + 1) * 1.08) == n:
    print(ans + 1)
else:
    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(':(')

exit(0)

Submission status: Accepted

Solution code:
import math
n = int(input())
fl = False
for i in range(5*10**4+1):
  k = math.floor(i*1.08)
  if k == n:
    print(i)
    fl = True
if not fl:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

x = int(input())

y = math.ceil(x / 1.08)

if int(y*1.08) == x:
    print(y)
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())

X = N // 1.08

if int(X * 1.08) == N:
    print(int(X))
    exit()
if int((X+1) * 1.08) == N:
    print(int(X+1))
    exit()
if int((X-1) * 1.08) == N:
    print(int(X-1))
    exit()
print(':(')

Submission status: Accepted

Solution code:
import math


def main():
    n = int(input())
    ans = -1;
    for i in range(n + 1):
        if int(math.floor(1.08 * i)) == n:
            ans = i
            break
    if ans == -1:
        print(':(')
    else:
        print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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