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 = float(input())
for i in range(50000):
    if math.floor(i * 1.08) == N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
l = -1
r = N+100
while r - l > 1:
    m = l + (r - l)//2

    if math.floor(1.08 * m) >= N:
        r = m
    else:
        l = m
print(r if math.floor(1.08 * r) == N else ':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
n=int(input())
v=n*100//108
for i in range(min(0,v-100),v+100):
    if i*108//100==n:print(i);break
else:print(":(")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
flag=False
for i in range(1,5*(10**4)+1):
    num=i*1.08
    if N==int(num):
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())
if int(N//1.08 * 1.08) == N:
    print(int(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 x in range(1,50001):
    if x*1.08//1 == n:
        print(x)
        exit()
    
print(":(")

Submission status: Accepted

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

for i in range(1,50000):
    if int(i*1.08) == n:
        print(i)
        exit()
    elif int(i*1.08) > n:
        print(':(')
        exit()

Submission status: Accepted

Solution code:
X = int(input())
import math
ans = math.floor(math.ceil(X/1.08))

if math.floor(math.ceil(X/1.08)*1.08) != X:
  print(":(")
else:
  print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
N = int(input())
start = int(N / 1.08)
goal = int((N+1) / 1.08) + 2

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

Submission status: Accepted

Solution code:
import math
def main():
    n = int(input())
    mn = math.floor(n/1.08)
    mx = math.floor((n+1)/1.08)+1
    for i in range(mn, mx):
        if math.floor(1.08*i) == n:
            print(i)
            return 0
    print(':(')

main()

Submission status: Accepted

Solution code:
import math
N = int(input())
zeinuki = math.floor(N / 1.08)
if N != math.floor(zeinuki * 1.08):
  if N != math.floor((zeinuki + 1) * 1.08):
    print(':(')
  else:
    print(zeinuki + 1)
else:
  print(zeinuki)

Submission status: Accepted

Solution code:
import math
N=int(input())
X=math.ceil(N/1.08)
print(X if int(X*1.08)==N 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)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Sat Mar 28 15:38:17 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n = ni()

flag = False
ans = n
for i in range(0, n + 1):
    if int(i * 1.08) == n:
        flag = True
        ans = i
        break

print(ans if flag else ":(")

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
def main():
    import math

    n = int(input())
    x, y = n / 1.08, (n + 1) / 1.08
    a, b = math.floor(x), math.ceil(y)

    for i in range(a, b):
        if math.floor(1.08 * i) == n:
            print(i)
            break
    else:
        print(':(')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
min = N * 100/108
max = (N+1)*100/108
for i in range(50000):
    if min <= i and i < max:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
N = int(input())*100
x = math.ceil(N / 108)
M = x*108
if M//100 == N//100:
  print(x)
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor
n = int(input())
ans = [i for i in range(50000) if floor(i*1.08) == n]
print(ans[0] if ans else ':(')

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

Submission status: Accepted

Solution code:
#!/usr/bin/env pytho3
import math
# x*1.08 <= s < x*1.08+1 になっている
# x <= 50000なのでs <= 54000
s = int(input())
for i in range(54001):
    if int(i*1.08) == s:
        print(i)
        exit()
print(":(")
"""
x = math.ceil(s*100/108)
if x >= (s+1)*100//108:
    print(":(")
else: print(x)"""

Submission status: Accepted

Solution code:
m1 = int(input())

res = int(m1/1.08)

for i in range(40):
    if( int((res+i)*1.08) == m1 ):
        print(res+i)
        break;
    if( int((res+i)*1.08) > m1 ):
        print(':(')
        break

Submission status: Accepted

Solution code:
N = int(input())
import math
a = math.ceil(N/1.08-1)
ans=':('
if int((a+1)*1.08)==N:
  ans = a+1

print(ans)

#print(*ans, sep='/n')

Submission status: Accepted

Solution code:
N = int(input())
for X in [-int(-N/1.08), int((N+1)/1.08)]:
    if int(X * 1.08) == N:
        print(X)
        exit()
print(":(")

Submission status: Accepted

Solution code:
#B
import math
n=int(input())
ans=None
for i in range(1,54000):
    if math.floor(i*1.08)==n:
        ans=i
        break
    if i==n-1:
        ans=":("
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
from math import floor, ceil
n = int(input())
f = floor(n/1.08)
c = ceil(n/1.08)
n2 = floor(f*1.08)
n3 = floor(c*1.08)
if n == n2:
    print(f)
elif n == n3:
    print(c)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n=int(input())
a_min=n/1.08
a_max=(n+1.0)/1.08
#print(a_min,a_max)
ans=a_min

if (math.ceil(a_min)<math.ceil(a_max)):
    print(math.ceil(a_min))
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

y = int(n / 1.08)

t = 0
for i in range(-10, 11):
    if int((y + i) * 1.08) == n:
        print(y+i)
        t = 1
        break
if t == 0:
    print(":(")

Submission status: Accepted

Solution code:
import math

N=int(input())

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

Submission status: Accepted

Solution code:
import math

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

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

    print(':(')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
m=int(n/1.08)
for x in [0,1]:
    if n==int((m+x)*1.08):
        print(m+x)
        break
else:print(":(")

Submission status: Accepted

Solution code:
from math import floor


def main():
    cost = int(input())
    for i in range(1, 50001):
        if floor(i * 1.08) == cost:
            print(i)
            break
    else:
        print(":(")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

n = int(input())

m = math.floor((n+1)/1.08)
l = math.floor(m*1.08)

if n==l:
    print(m)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

price = []

for i in range(1, 50000):
    p = int(i*1.08)
    price.append(p)

for i, p in enumerate(price):
    if p==n:
        print(i+1)
        exit()

print(':(')

Submission status: Accepted

Solution code:
n=int(input())
tmp = (n * 100 + 108 - 1) // 108
if tmp * 108 //100 != n:
    print(':(')
else:
    print(tmp)

Submission status: Accepted

Solution code:
#インクルード
import math
#ロジック
N = int(input())
kirisage = math.floor(N / 1.08)
kiriage = math.ceil(N / 1.08)
if N == math.floor(kirisage * 1.08):
  print(kirisage)
elif N == math.floor(kiriage * 1.08):
  print(kiriage)
else:
  print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
A = []
I = []
cnt=0

for i in range(50000):
  I.append(i)
  A.append(math.floor(1.08*i))

for i in range(len(A)):
  if A[i]==N:
    cnt+=i

if cnt!=0:
  print(cnt)
elif cnt==0:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import math

n = int(input())
n_max = 46298

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

print(':(')

Submission status: Accepted

Solution code:
def solve():
    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)
    else:
        print(':(')


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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
n=int(input())
ans=":("
for i in range(50000):
    if n==math.floor((i+1)*1.08):
        ans=i+1
        break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

def getprice(n):
    bottom = n/1.08
    top = (n+1)/1.08
    for i in range(int(bottom),int(top)+2):
        if bottom <= i < top:
            return i
    return ":("

print(getprice(n))

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 math

N = int(input())

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

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

Submission status: Accepted

Solution code:
from math import ceil,floor
N=int(input())
n1=int(N/1.08)
n2=ceil(N/1.08)

if floor(n1*1.08)==N:
 print(n1)
elif floor(n2*1.08)==N:
 print(n2)
else:
 print(":(")

Submission status: Accepted

Solution code:
from math import ceil, floor


def main(n: int):
    ans = ceil(n / 1.08)

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


if __name__ == "__main__":
    n = int(input())

    main(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
a=[13,26,40,53,67,80,94,107]
if n%108 in a:
    print(":(")
else:
    print(math.ceil(n*100/108))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(1,N+1):
    if i*108//100 == N:
        print(i)
        break
else:
    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:
# -*- coding: utf-8 -*-

# N円の支払い (1 ≤ N ≤ 50000)
N = int(input())#入力

count = 0
for x in range(50000):
    if(N == int(x*1.08)):
        without_tax = x #税抜き価格
    else: count = count + 1

if(count == 50000): print(':(')
else: print(without_tax)

Submission status: Accepted

Solution code:
import math

N = int(input()) 
ans = math.ceil(N/1.08)
print(ans if math.floor(ans * 1.08) == N else ":(")

Submission status: Accepted

Solution code:
n=int(input())
for x in range(50000):
  if int(x*1.08)==n:
    print(x)
    break
else:
  print(':(')

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for x in range(n+1):
    cost = floor(x * 1.08)
    if cost == n:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

a = N / 1.08
b = (N + 1) / 1.08 - 0.1 ** 5

if a % 1 == 0 or int(b) - int(a) >= 1:
    print(int(b))
else:
    print(':(')

Submission status: Accepted

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

if 0 <= (original * 1.08) - N < 1:
  print(original)
elif 0 <= ((original + 1) * 1.08) - N < 1:
  print(original + 1)
else:
  print(':(')

Submission status: Accepted

Solution code:
n = int(input())

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

print(":(")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

    for n in range(50000):
        if N == math.floor(1.08 * n):
            print(n)
            exit()

    print(':(')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
price = int(input())
if price%1.08<0.1:
  print(":(")
else:
  print(math.ceil(price/1.08))

Submission status: Accepted

Solution code:
a = int(input())
f = 0
for i in range(50001):
    if int(i*1.08) == a:
        print(i)
        exit()
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

p=N/1.08
if(p%1==0):
	print(int(p))
else:
	if(int((int(p)+1)*1.08)!=N):
		print(":(")
	else:
		print(int(p)+1)

Submission status: Accepted

Solution code:
import math

N = int(input())

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

Submission status: Accepted

Solution code:
# B - Tax Rate
from math import ceil, floor


def main():
    N = int(input())
    x = ceil(N / 1.08)
    is_possible = floor(x * 1.08) == N
    print(x if is_possible else ":(")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    n = ni()

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

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
# Input the amount of money Takahashi paid
N = int(input())
 
# Check if the price before tax is X, for X = 1, 2, 3, ..., N
ans = -1
for i in range(1, N + 1):
	if int(i * 1.08) == N:
		ans = i
 
# Print answer
if ans != -1:
	print(ans)
else:
	print(":(")

Submission status: Accepted

Solution code:
N=int(input())
X=int(N/1.08)
C=[X-1,X,X+1]
for c in C:
    d=int(c*1.08)
    if d==N:
        print(c)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
C = N * 100 // 108
C_l = [C - 1, C, C + 1]
for c in C_l:
    c_ = c * 108 // 100
    if c_ == N:
        print(c)
        break
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
else:
    print(':(')

Submission status: Accepted

Solution code:
n=int(input())
ans=":("

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

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:
a = int(input())
b = int(a/1.08)
c = b + 1
d = int(b * 1.08)
e = int(c * 1.08)
if d == a:
  print(b)
elif e == a:
  print(c)
else:
  print(':(')

Submission status: Accepted

Solution code:
n=int(input())

t=n/1.08

f=0
if int(t)*1.08 >= n:
  f=int(t)
else:
  f=int(t)+1

if int(f*1.08) == n:
  print(f)
else:
  print(":(")

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int):
    # 候補を二つ
    X1 = int(N/1.08)
    X2 = int(N/1.08)+1

    if int(X1*1.08) == N:
        print(X1)
    elif int(X2*1.08) == N:
        print(X2)
    else:
        print(":(")
    return


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

Submission status: Accepted

Solution code:
import sys
import math
import numpy as np
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    t = int(n / 1.08) - 2
    for i in range(t,t+5):
        if i * 108 // 100 == n:
            return i

    return ":("


print(main())

Submission status: Accepted

Solution code:
import math

zeikomi = int(input())
zeinuki_mae = zeikomi / 1.08
zeinuki = math.ceil(zeinuki_mae)
zeikomi_ato = math.floor(zeinuki * 1.08)

if zeikomi != zeikomi_ato:
    print(':(')
else:
    print(zeinuki)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
for x in range(n + 1):
    if x * 108 // 100 == n:
        print(x)
        break
else:
    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
p = int(input())
d = math.floor(p / 1.08)
if(math.floor(d * 1.08) == p):
	print(d)
elif(math.floor((d+1) * 1.08) == p):
	print(d+1)
else:
	print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
price = math.ceil(n/1.08)

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

Submission status: Accepted

Solution code:
import math
a = int(input())
 
b = math.floor(a/1.08)
 
if a <= b*1.08 and b*1.08 < a + 1:
    print(b)
elif a <= (b + 1)*1.08 and (b + 1)*1.08 < a + 1:
    print(b+1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
import math, sys
x = math.floor(N/1.08)
c = [x-1, x, x+1]
C = [i*1.08 for i in c]
for i, j in zip(c, C):
    if math.floor(j) == N:
        print(int(i))
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
import math
N=int(input())
X=float(N)/1.08
if X%1==0.0:
    print(int(X))
else:
    Y=math.floor(X)
    if math.floor(Y*1.08)==N:
        print(Y)
    elif math.floor((Y+1)*1.08)==N:
        print(Y+1)
    elif math.floor((Y-1)*1.08)==N:
        print(Y-1)
    else:
        print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
q = math.floor(N / 1.08)
if math.floor(q * 1.08) == N:
    print(q)
elif math.floor((q + 1) * 1.08) == N:
    print(q + 1)
elif math.floor((q - 1) * 1.08) == N:
    print(q - 1)
else:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
	n = int(input())
	# b = int(input())
	# a = list(map(int,input().split()))
	# A = [list(map(int, input().split())) for _ in range(n)]
	# print(a)
	quit=0
	for i in range(50001):
		if int(i * 1.08) == n:
			print(i)
			quit = 1
			break
	
	if quit == 0:
		print(":(")





if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
zeikomi = int(input())
zeinuki = math.ceil(zeikomi / 1.08)

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

Submission status: Accepted

Solution code:
n=int(input())
val=0
ans=0
for i in range(int(n//1.08)-2,int(n//1.08)+3):
	if i*1.08//1==n:
		ans=i
		val=1
print(':(' if val==0 else ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
price = int(input())
a = (price + 1) // 1.08
b = price // 1.08
if a == b+1:
	print(int(a))
else:
  	print(":(")

Submission status: Accepted

Solution code:
N=int(input())
a=N*100//108
out=':('
for i in range(a-3, a+3, 1):
  temp=(i*1.08)//1
  if temp==N:
    out=i
print(out)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = n * 100 // 108
if n * 100 % 108 > 0:
    x += 1
else:
    pass
if int(x * 1.08) == n:
    print(x)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    for i in range(1, 50000):
        if (i * 1.08) // 1 == n:
            print(i)
            exit()
    print(":(")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if math.ceil(N/1.08) < (N+1)/1.08:
    print(math.ceil(N/1.08) )
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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