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:
# -*- coding: utf-8 -*-

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

    for Ans in range(N+1):
        Check = int(Ans * 1.08)
        if Check == N:
            print(Ans)
            return

    print(":(")
        


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(1, N+1):
    if i + math.floor(i * 0.08) == N:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
N=int(input())

num=N/1.08

flag1=int(num)
flag2=int(num)+1

if int(flag1*1.08)==N:
    print(flag1)
elif int(flag2*1.08)==N:
    print(flag2)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

f = math.floor(N / 1.08)
c = math.ceil(N / 1.08)

if (math.floor(f * 1.08) == N):
    print(f)
elif (math.floor(c * 1.08) == N):
    print(c)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

no_tax=[[i,int(i*1.08)] for i in range(1,50001)]

ans=False
for g in range(len(no_tax)):
    if n==no_tax[g][1]:
        ans=True
        break

if ans:
    print(no_tax[g][0])
else:
    print(":(")

Submission status: Accepted

Solution code:
N = int(input())
flag = False

for i in range(50000):
    if (not flag) and ((i*1.08)//1 == N):
        print(i)
        flag = True

if (not flag):
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
f=0
for i  in range(50001):
    if int(i*1.08)==N:
        print(i)
        f=1
        break
print(":(" if f==0 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())
a = []
flag = 0
for i in range(1,50000):
    b = int(i * 1.08)
    if b == n:
        print(i)
        flag = 1
        break
if flag == 0:
    print(":(")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

N=int(input())

S=N*100//108

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

Submission status: Accepted

Solution code:
N = int(input())


f0 = int(N / 1.08)
f1 = f0 + 1

if int(f0 * 1.08) == N:
    print(f0)
elif int(f1*1.08) == N:
    print(f1)
else:
    print(":(")

Submission status: Accepted

Solution code:
X = int(input())
if (X/1.08).is_integer():
  print(int((X/1.08)))
else:
  if int((int(((X/1.08)))+1)*1.08)==X:
    print(int((int(((X/1.08)))+1)))
  else:
    print(":(")

Submission status: Accepted

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

X = math.ceil(N/1.08)



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

Submission status: Accepted

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


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
import math
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    n=ii()
    pay=n/1.08
    if int(int(pay)*1.08)==n:
        print(int(pay))
    elif int(math.ceil(pay)*1.08)==n:
        print(math.ceil(pay))
    else:
        print(':(')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

N = int(input())

ans = math.ceil(N/1.08)
if (math.floor(ans*1.08) == N):
    print(ans)
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:
n = int(input())
if n*100 % 108 ==0:
    print(int(n/1.08))
else:
    x = int(n/1.08)+1
    if int(x*1.08) == n:
        print(x)
    else:
        print(":(")

Submission status: Accepted

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

_n = int(input())


def chker(n):
    nontax1 = int(n / 1.08)
    nontax2 = nontax1 + 1

    if int(1.08 * nontax1) == n:
        print(nontax1)
    elif int(1.08 * nontax2) == n:
        print(nontax2)
    else:
        print(':(')


chker(_n)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

n = int(input())
x_min = int(n/1.08)
x_max = int((n+1)//1.08+1)

ans = 0
for i in range(x_min, x_max+1):
  if math.floor(i*1.08) == n:
    ans=i
    print(i)
    break

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

Submission status: Accepted

Solution code:
NtoX = {}
for i in range(1, 54001):
    NtoX[i] = -1
for i in range(1, 50001):
    n = int(i*1.08)
    NtoX[n] = i
    
N = int(input())
print(":(" if NtoX[N]==-1 else NtoX[N])

Submission status: Accepted

Solution code:
n=int(input())
lo=0 
ans=":("
hi=n+4 
while lo<=hi: 
    mi=(lo+hi)>>1 
    if int(mi*(1.08))==n:
        ans=mi 
        break 
    elif mi*(1.08)>n:
        hi=mi-1 
    else:
        lo=mi+1 
print(ans)

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

Submission status: Accepted

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

print(':(')

Submission status: Accepted

Solution code:
N = int(input())
X = N//1.08
X = int(X)
while X*1.08 <= N+1:
    if int(X*1.08) == N :
        print(int(X))
        exit()
    else:
        X += 1
print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
n=int(input())
x=int(n/1.08)
for i in [x-1,x,x+1]:
    if math.floor(i*1.08)==n:
        print(i)
        sys.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:
# coding: utf-8

N = int(input())

origin = int(N / 1.08)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

res = ':('

for X in range(1,N+1):
    temp = int(X * 1.08)
    if temp == N:
        res = X
        break 

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


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

    # print(math.floor(N * 1.08))

    for i in range(100000):
        if N == int(i * 1.08):
            print(i)
            return

    print(':(')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

X_floor = math.floor(N / 1.08)
X_ceil = math.ceil(N / 1.08)

if int(X_floor * 1.08) == N:
    print(X_floor)
    sys.exit()
if int(X_ceil * 1.08) == N:
    print(X_ceil)
    sys.exit()

print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    x = II()
    for i in range(50000):
        if int(i * 1.08) == x:
            print(i)
            return
    print(":(")


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N = int(input())
import math
price = ':('
for i in range(50001):
  X = i*1.08
  if math.floor(X) == N:
    price = i
    break
print(price)

Submission status: Accepted

Solution code:
n=int(input())
nn=n/1.08
s=':('
def ans():
  m=int(nn)
  for i in range(m-5,m+6):
    if int(i*1.08)==n:
      print(i)
      return
  print(s)
ans()

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())
low = math.ceil(N / 1.08)
up = math.floor(N / 1.08)

if math.floor(low * 1.08) == N:
    print(low)
elif math.floor(up * 1.08) == N:
    print(up)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math


N = int(input())

ans = N / 1.08
tmp = math.ceil(ans)

tmp2 = math.floor(tmp*1.08) 

if int(tmp2) == N:
    print(int(tmp))

else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys
n = int(input())
ans = math.floor(n/1.08)
for i in range(ans,ans+2):
    a = math.floor(i*1.08)
    if a == n:
        print(i)
        sys.exit()
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
N = int(input())
for x in range(1,50000):
    if int(x * 1.08) == N:
        print(x)
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ans = 0
    tmpls = []
    for i in range(1,50001):
        tmp = int(i*1.08)
        tmpls.append(tmp)
    for i, p in enumerate(tmpls, 1):
        if n == p:
            ans = i
            break
    if ans == 0:
        print(":(")
    else:
        print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
X = N/1.08
m = int(X)
ans = ':('
for i in [m-2,m-1,m,m+1,m+2]:
    if int(i*1.08)==N:
        ans = i
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
ans=":("

for i in range(50000):
    if int(i*1.08)==n:
        ans=i

print(ans)

Submission status: Accepted

Solution code:
# 2019/12/01
# 三井住友信託銀行プログラミングコンテスト2019 - B

# Input
n = int(input())

# Calc
val_d = n / 1.08
val_i = int(n / 1.08)

if val_d == val_i:
    ans = val_i
else:
    if int((val_i + 1) * 1.08) == n:
        ans = val_i + 1
    else:
        ans = ":("

# Output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
ERR = ':('

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

if answer == -1:
    print(ERR)
else:
    print(answer)

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

x = [i for i in range(1,50001)]
y = [int(xi * 1.08) for xi in x]

if n in y:
    print(x[y.index(n)])
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

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

print(':(')

Submission status: Accepted

Solution code:
def ans(N):
  if N < 13:
    return N
  high = N
  low = 0
  while 1 < high - low:
    med = (high + low) // 2
    p = int(med * 1.08)
    if p == N:
      return med
    if p < N:
      low = med
    if N < p:
      high = med
  return ':('
N = int(input())
print(ans(N))

Submission status: Accepted

Solution code:
n=int(input())

x = int(n / 1.08)

for i in range(x,x+4000):
  if int(i * 1.08) == n:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
def num():
    return int(input())

def nums():
    return list(map(int,input().split()))

#A
"""
M1,D1 = nums()
M2,D2 = nums()
print(int(M1 != M2))
"""
#B
import math
N = num()
without_tax = N / 1.08
if int(int(without_tax) * 1.08) == N:
    print(int(without_tax))
elif int(math.ceil(without_tax) * 1.08) == N:
    print(math.ceil(without_tax))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
X = math.floor(N/1.08)
X_list = [X-3, X-2, X-1, X, X+1, X+2, X+3]

for x in X_list:
    if(math.floor(x*1.08) == N):
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

ans = 100000

for i in range(50000):
    Z = int(i * 1.08)
    if Z == N :
        ans = i

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

n = int(input())

n2 = int(n // 1.08)

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

Submission status: Accepted

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

import math
import itertools

# 入力
N = int(input())
#S = str(input())
#M1, D1 = map(int, input().split())

X = math.ceil(N/1.08)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
X1 = N //1.08
X2 = X1 + 1

if X1 * 1.08 // 1 == N:
    print(int(X1))
elif X2 * 1.08 //1 == N:
    print(int(X2))
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

a = round(n / 1.08)
flag = 0
ans = 0
for i in range(a-2, a+3):
    if i + int(i * 0.08) == n:
        ans = i
        flag = 1
        break

if n < 13:
    print(n)
elif flag:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

ans = ":("
candidate = [ (i, int(i*1.08)) for i in range(1,n+1) ]
candidate_2 = [ i[1] for i in candidate ]

if n in candidate_2:
    ans = candidate[candidate_2.index(n)][0]
print(ans)

Submission status: Accepted

Solution code:
import math
TAX = 1.08
N = int(input())
num = N / TAX
numf = math.floor(num)
numc = math.ceil(num)
if math.floor(numf * TAX) == N:
    print(numf)
elif math.floor(numc * TAX) == N:
    print(numc)
else:
    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)*1.08)==N:
    print(int((N//1.08+1)))
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding:utf-8
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:
# -*- coding: utf-8 -*-
import math
N = int(input())

q, mod = divmod(N*100, 108)

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

Submission status: Accepted

Solution code:
N=int(input())
l=N*100//108
stp=0
for i in range(2):
  if (l+i)*108//100==N:
    print(l+i)
    stp=1
    break
if stp==0:
  print(':(')

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    ans = N / 108 * 100

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''
import math


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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = math.floor(N/1.08)

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

Submission status: Accepted

Solution code:
N = int( input() )

cnt = 0
#cnt = float(N) / 1.08

#if(  )

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = (n + 0.5) / 1.08
b = n / 1.08
# print(a,b)
ans = -1
for i in range(int(b)-2,int(a)+2):
    if n <= i*1.08 < n+1:
        ans = i
        break
if ans == -1:
    print(":(")
else:
    print(ans)

Submission status: Accepted

Solution code:
#
from math import ceil,floor
n = int(input())
a_upper = ceil(n/1.08)
a_lower = floor(n/1.08)

if a_upper == a_lower:
    print(a_upper)
else:
    if floor(a_upper*1.08) == n:
        print(a_upper)
    elif floor(a_lower*1.08) == n:
        print(a_lower)
    else:
        print(":(")

Submission status: Accepted

Solution code:
N = int(input())
flag=False

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=one_int()

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

Submission status: Accepted

Solution code:
import math

def main():
    N = int(input())
    # x = math.floor(N / 1.08)
    # if x * 1.08 == N:
    #     print(x)
    # else:
    #     print(':(')

    # # if x == y:
    # #     print()

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
N = int(input())
# 1.08で割る,小数点切り捨て
sp_n = int(N / 1.08)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

zei = 1.08
result = int(n / zei)
if int(result*zei) == n:
    print(result)
    exit()
big = int(result*zei) > n
while True:
    if big:
        result -=1
    else:
        result +=1
    if int(result*zei) == n:
        print(result)
        exit()
    if big != (int(result*zei) > n):
        print(":(")
        exit()

Submission status: Accepted

Solution code:
num = int(input())
tax_price_list = [int(num*1.08) for num in range(num+1)]

if num in tax_price_list:
    print(tax_price_list.index(num))
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

sho, mod = divmod(N , 1.08)

for p in [sho - 1, sho, sho + 1]:
    price = int(int(p) * 1.08)
    if price == N:
        print(int(p))
        exit(0)
    else:
        pass

print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

input = sys.stdin.readline

N = int(input())

large = (N+1)/1.08
small = N/1.08

ans = math.ceil(small)
if ans>=large: ans = ':('

print(ans)

Submission status: Accepted

Solution code:
# A,B = map(int, input().split())
# C,D = map(int, input().split())
N = int(input())

tmp = int(N/1.08)

ans = ":("
for i in range(5):
    if int((tmp-2+i)*1.08)==N:
        ans = tmp-2+i
        break
    
print(ans)
#print(tmp, N)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
n = int(input())

shousuu = (n / 1.08) // 1
sita = int(shousuu - 2)
ue = int(shousuu + 2)

for i in range(sita, ue+1):
    if (i * 1.08) // 1 == n:
        print(i)
        exit()

print(':(')

Submission status: Accepted

Solution code:
n = int(input())

k = n*100/108
k = int(k)

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

Submission status: Accepted

Solution code:
import math

n = int(input())

kirisute = math.floor(n/1.08)
kiriage = math.ceil(n/1.08)

#print(kiriage)
#print(kirisute)

if math.floor(kiriage*1.08) == n:
    print(kiriage)
elif math.floor(kirisute*1.08) == n:
    print(kirisute)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

is_impossible = True

for i in range(1, 50001):
    if N == int(i * 1.08):
        print(i)
        is_impossible = False

if is_impossible:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

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(50001):
  if int(i * 1.08) == N:
    print(i)
    break
else:
  print(":(")

Submission status: Accepted

Solution code:
N=int(input())
if (N*100)%108==0:
  print(int(N/1.08))
else:
  X=int((N+1)/1.08)
  if int(X*1.08)==N:
    print(X)
  elif int((X-1)*1.08)==N:
    print(X-1)
  else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
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:
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(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    n = int(input().strip())
    for i in range(50000):
        if int(i * 1.08) == n:
            print(i)
            return 0
    print(":(")
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
tax = 1.08
N = int(input())
X = int(N / tax)
n1, n2 = int(X * tax), int((X + 1) * tax)
if n1 == N:
    print(X)
elif n2 == N:
    print(X + 1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
n=int(input())
x=int(n/1.08)
for i in range(x-100,x+100):
    if int(i*1.08)==n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

a = N / 1.08

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

Submission status: Accepted

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

ans = 0
for i in range(1, N+1):
    if(floor(i*1.08) == N):
        ans = i

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

Submission status: Accepted

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
N = float(input())
M = (100*N/108)//1
if M*1.08//1 == N:
    print(int(M))
elif (M+1)*1.08//1 ==N:
    print(int(M+1))
else:
    print(":(")