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:
A=int(input())
for i in range(1,50000):
    if int(i * 1.08) == A:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())

n_origin = int(n * 100 / 108.)
if int(n_origin * 108 / 100.) == n:
    print(n_origin)
elif int((n_origin + 1) * 108 / 100.) == n:
    print(n_origin + 1)
else:
    print(":(")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_b

def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

N = INT()

x = 0
while True:
    ans = int(x * 1.08)
    if ans == N:
        print(x)
        break
    elif ans > N:
        print(":(")
        break
    x += 1

Submission status: Accepted

Solution code:

import math
import sys
N = int(input())
ans = 1
while ans <= N:
    if(math.floor(ans * 1.08) == N):
        print(ans)
        sys.exit()
    else:
        ans += 1
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()
else:
  print(':(')

Submission status: Accepted

Solution code:
import math
def py():
    print("Yes")
def pn():
    print("No")
def iin():
    x = int(input())
    return x

x = iin()
b = math.floor(x/1.08)
a = math.ceil(x/1.08)
if int(b * 1.08) == x:
    print(b)
elif int(a * 1.08) == x:
    print(a)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

n_origin = int(n * 100 / 108.)

if int(n_origin * 108 / 100) == n:
  print(n_origin)
elif int((n_origin+1) * 108 / 100) == n:
  print(n_origin+1)
else:
  print(":(")

Submission status: Accepted

Solution code:
n = int(input())
rate = 1.08

x = int(n / rate)
r = int(x * rate)
l = int((x + 1) * rate)
if n == r:
    print(x)
elif n == l:
    print(x + 1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
import sys

N = int(input())

for i in range (1, 50001):
    if int(i*1.08) == N:
        print(i)
        sys.exit()
        break

print(':(')

Submission status: Accepted

Solution code:
from math import floor

def main():
    N=int(input())
    for X in range(1,N+1):
        if int(X*1.08) == N:
            print(X)
            exit()
    print(':(')

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
X = int(input())

for i in range(50000):
  if int(i*1.08) == X:
    print(i)
    break
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
result = float(N) / 1.08
result_int_floor = math.floor(result)
result_int_ceil = math.ceil(result)
if(math.floor(result_int_floor * 1.08) == N):
    print(result_int_floor)
elif(math.floor(result_int_ceil * 1.08) == N):
    print(result_int_ceil)
else:
    print(":(")

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N+1):
    if i*108//100==N:
        print(i)
        break
    elif i==N:
        print(":(")
        break

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:
import sys
n = int(input())
 
for i in range(n+1):
  if i*108//100 == n:
    print(i)
    sys.exit()
    
print(":(")

Submission status: Accepted

Solution code:
import sys
import math

input = sys.stdin.readline

def main():
    _is_found = False
    n = int(input())
    for x in range(n+1):
        if math.floor(x * 1.08) == n:
            print(x)
            _is_found = True
            break
    if not _is_found:
        print(':(')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=(n//1.08)-1
ans=0
b=0
for i in range(3):
    b=int((a+i)*1.08)
    if b==n:
        ans=a+i
if ans==0:
    print(":(")
else:
    print(int(ans))

Submission status: Accepted

Solution code:
N = int(input())
flag = False
for i in range(1, N+1):
    X = i + int(i*0.08)
    if X == N:
        print(i)
        flag = True
        break
if not flag:
    print(':(')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    N=int(input())
    for i in range(N+100):
        if int(i*1.08)==N:
            print(i)
            return

    print(":(")
#%%submit!
resolve()

Submission status: Accepted

Solution code:
from math import ceil, floor

n = int(input())

x = ceil(n/1.08)
y = floor(x * 1.08)

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

Submission status: Accepted

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

ans =0

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

Submission status: Accepted

Solution code:
N = int(input())


for i in range(100000):
  a = int(i * 1.08)
  if a == N:
    print(i)
    exit()
  if a > N:
    break
print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

if n <= xtest*1.08 < n+1:
    print(xtest)
elif n<= (xtest+1)*1.08 < n+1:
    print(xtest+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
div_num = round(n/1.08)

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

Submission status: Accepted

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

print(':(')

Submission status: Accepted

Solution code:
N = int(input())
ans=-1

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

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = ':('
a = n / 1.08

for i in range(math.floor(a - 2) , math.ceil(a + 2)):
  if math.floor(i * 1.08) == n:
    ans = i
    break

print(ans)

Submission status: Accepted

Solution code:
def resolve():
    import math
    n = int(input())
    res = math.ceil(n / 1.08)
    if str(res)[-2:] == '.0':
        print(int(res))
    elif str(res * 1.08).split('.')[0] == str(n):
        print(int(str(res).split('.')[0]))
    else:
        print(':(')

resolve()

Submission status: Accepted

Solution code:
from math import floor

N = int(input())

for x in range(1,50001):
  if N == floor(x * 1.08):
    print(x)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
a = {int(i*1.08):i for i in range(1, 5*10**4+1)}
if n in a:
    print(a[n])
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

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

Submission status: Accepted

Solution code:
n = int(input())

for x in range(1, 10**5):
	if int(x * 1.08) == n:
		print(x)
		exit()
print(':(')

Submission status: Accepted

Solution code:
a=int(input())
b=1.08
d=int(a/b)
d=d-1
hoge=0
for i in range(4):
  if(int(d*b)==a and hoge==0):
    print(d)
    hoge=1
  d=d+1
if(hoge==0):
  print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
import math
def resolve():
  found = False
  N = int(input())
  for x in range(int(N/1.08), int((N+1)/1.08+1)):
    if N == math.floor(x*1.08):
      print(x)
      found = True
      break
  
  if not found:
    print(":(")

resolve()

Submission status: Accepted

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

ans = int(N // 1.08 + 1)

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

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

def get_net_price(N):
    N_upper = math.ceil((N+1)/1.08 - 1)
    N_lower = math.ceil(N/1.08)
    if N_upper < N_lower: return None
    else: return N_lower

def main():
    gross_price = int(input())
    net_price = get_net_price(gross_price)
    if net_price == None: print(":(")
    else: print(net_price)

if __name__ == "__main__":
    try:
        assert get_net_price(432) == 400
        assert get_net_price(1079) == None
        assert get_net_price(1001) == 927
    except:
        import traceback
        traceback.print_exc()
        exit()
    main()

Submission status: Accepted

Solution code:
N=int(input())
for a in range(0,100):
    if (100*N+a) % 108 == 0:
        X=(100*N+a)/108
        print(int(X))
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=float(input())

N2=int(N//1.08)
N3=int((N+1)/1.08)

for i in range(N2,N3+1):
    if int(i*1.08)==N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())
a = math.ceil(n/1.08)

if n+1 > a*1.08 >= n:
  print(a)
else:
  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:
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())
for i in range(50000):
    if int(i*1.08)==n:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

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

res = []
for i in range(1,N+1):
    cal = math.floor(i * 1.08)
    if cal == N:
        res.append(i)
if len(res) == 0:
    print(':(')
else:
    print(res[0])

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:
wtax = int(input())
wotax = int((wtax/27)*25)
if int((wotax/25)*27)==wtax:
  print(wotax)
elif int(((wotax+1)/25)*27)==wtax:
  print(wotax+1)
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

X = int(N / 1.08)

ans = ':('
for x in range(X-5, X+6):
    n = int(x * 1.08)
    if n == N:
        ans = x
        break
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:
def II(): return int(input())
def MI(): return map(int,input().split())
def LMI(): return list(map(int,input().split()))
def LIIN(n): return list(int(input()) for _ in range(n))
def LMIN(n): return [list(map(int, input().split())) for _ in range(n)]
def IS(): return input()
def LS(): return list(input())
def MS(): return map(str,input().split())
def LMS(): return list(map(str,input().split()))
def LMS(): return list(map(str,input().split()))
def LISN(n): return list(input() for _ in range(n))
def LMSN(n): return [input().split() for _ in range(n)]
MOD = 10**9+7
INF = 10**18

def main():
    n = II()
    tmp = (n * 100 + 108 - 1) // 108
    if tmp * 108 //100 != n:
        print(':(')
    else:
        print(tmp)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
flg=False
ans=0
for n in range(1, N+1):
  if (int(1.08*n) == N):
    ans=n
    flg=True
if flg:
  print(ans)
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

if N % 1.08 == 0:
    print(int(x))
else:
    if y * 1.08 >=  N+1 and x * 1.08 < N:
        print(':(')
    else:
        print(int(y))

Submission status: Accepted

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

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 sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left

#======================================================#

def main():
    n = II()
    x = divc((n*100),108)
    if divf(x*108,100) == n:
        print(x)
    else:
        print(':(')
 

if __name__ == '__main__':
    main()

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 x in range(n+1):
  if int(x*1.08)==n:
    print(x)
    break
else:
  print(':(')

Submission status: Accepted

Solution code:
N = int(input())

Tax = False

for i in range(50000):
    if int(i*1.08) == N:
        Tax = True
        break

if Tax:
    print(i)
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)
    exit(0)
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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
# N <= X x 1.08 < N+1
# になる整数Xを求める

# min_xとmax_xの間に1つでも整数が存在していればいい
import math
min_x = math.ceil(N/1.08)
max_x = math.ceil((N+1)/1.08)
if max_x - min_x >= 1:
    print(min_x)
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.buffer.readline
N=int(input())
tax=27/25
for i in range(1,N+1):
    money=int(i*tax)
    if money==N:
        print(i)
        exit(0)
print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
i = 0

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

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    for i in range(50000):
        t = i * 1.08 // 1
        if t == N:
            print(i)
            break
    else:
        print(':(')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
taxed_price = int(input())
raw_price = taxed_price // 1.08

if int(raw_price * 1.08) == taxed_price:
    print(int(raw_price))
elif int((raw_price + 1) * 1.08) == taxed_price:
    print(int(raw_price + 1))
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

import math

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

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

    # print('x',x)
    # print('xn',xn)

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




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import math
N = int(input())
flag = True
for i in range(1,50001):
    if N == math.floor(i*1.08):
        print(i)
        flag = False
        break
if flag:
    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:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
from fractions import gcd
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    for i in range(1,50001):
        if int(i*1.08) == n:
            print(i)
            exit()
    print(':(')
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
from math import floor
n = int(input())
x = n * 100 // 108
a = floor(x * 1.08) == n
b = floor((x+1) * 1.08) == n
print(x if a else x+1 if b else ':(')

Submission status: Accepted

Solution code:
def hantei(N):
    for i in range(100*N,100*(N+1)):
        if i%108 == 0:
            return(int(i/108))
    return ":("

N = int(input())
print(hantei(N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
num1 = int(n/1.08)
num1 -= 5
for i in range(100):
    num = num1 + i
    if n==int(num*1.08):
        ans = num
        break
    else:
        ans = ':('
print(ans)

Submission status: Accepted

Solution code:
from sys import exit
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 math
N = int(input())
flag = 0
for i in range(1,54001):
    if math.floor(i*1.08) == N:
        print(i)
        flag += 1
        break
if flag == 0:
    print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
ratio = 1.08
# orig_price_lower <= orig_price < orig_price_upper
orig_price_lower = n / ratio
orig_price_upper = (n + 1) / ratio
orig_price = math.ceil(orig_price_lower)
if orig_price < orig_price_upper:
    print(orig_price)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
for i in range(10**5):
    if N == int(i * 1.08):
        ans = i
        break

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

Submission status: Accepted

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

while math.floor(ans*1.08) < N:
  ans += 1
  if math.floor(ans*1.08) == N:
    print(ans)
  elif math.floor(ans*1.08) > N:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
ans = math.ceil(N // (1.08))


while math.floor(ans*1.08) < N:
  ans += 1
  if math.floor(ans*1.08) == N:
    print(ans)

  elif math.floor(ans*1.08) > N:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
ans = math.ceil(N // (1.08))


while math.floor(ans*1.08) < N:
  ans += 1

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

Submission status: Accepted

Solution code:
import math
N = int(input())
if N%27!=26 and N%27!=13:
  print(math.ceil(N/1.08))
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def resolve():
    n=int(input())
    x=int(-(-n//1.08))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

main()

Submission status: Accepted

Solution code:
import math

N = int(input())

def solve(n):
    for i in range(n + 1):
        if math.floor(i * 1.08) == n:
            print(i)
            return
    print(':(')

solve(N)

Submission status: Accepted

Solution code:
n = int(input())

base = n // 1.08
cands = [base-1, base, base+1]
flag = False
for cand in cands:
    if cand * 1.08 >= n and n > cand * 1.08 - 1:
        print(int(cand))
        flag = True
        break

if not flag:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
ans = -1
for x in range(n+1):
    tmp = int(x*1.08)
    if tmp == n:
        ans = x
        break

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    for i in range(1, 50001):
        if int(i*1.08) == n:
            print(i)
            break
    else:
        print(':(')

if __name__ == '__main__':
    main()

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(1,50001):
    if int(i*1.08)==n:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

x = (100 * N) //108
x1 = x + 1
if int(x * 1.08) == N or int(x1 * 1.08) == N:
    print(x if int(x * 1.08) == N else x1)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())
ans_min = math.floor(N / 1.08)
ans_max = math.ceil(N / 1.08)
if math.floor(ans_min * 1.08) == N:
    ans = ans_min
elif math.floor(ans_max * 1.08) == N:
    ans = ans_max
else:
    ans = ':('
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:
#!/usr/bin/env python3
import sys
import copy
from collections import deque


def main():

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

    print(':(')


main()

Submission status: Accepted

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(":(")

Submission status: Accepted

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

X = math.ceil(N / 1.08)

if (math.floor(X * 1.08) == N):
    print(X)
    exit()
print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

x = (n/1.08)

a = x//1
b = math.ceil(x)

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