Problem:


Score: 200 points

Problem Statement

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

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

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

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

Constraints

1 \leq N \leq 50000

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

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

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

If no value could be X, print :(.

Sample Input 1

432

Sample Output 1

400

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

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

Sample Input 2

1079

Sample Output 2

:(

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

Sample Input 3

1001

Sample Output 3

927

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



Sample input:
432


Sample output:
400

Submission status: Accepted

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

f = int(N // 1.1)

ok = False
while True:
  n = math.floor(f * 1.08)
  if n == N:
    ok = True
    break
  elif N < n:
    break
    
  f += 1
  
if not ok:
  print(':(')
else:
  print(f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#三井住友信託銀行2019-B
import math
n = int(input())

a = math.floor(n / 1.08)
b = math.ceil(n / 1.08)

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

Submission status: Accepted

Solution code:
#N,a,b = map(int,input().split())
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())
li = []
for i in range(1, 50001):
    li.append(math.floor(i * 1.08))
if n in li:
    print(math.ceil(n/1.08))
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

from math import floor

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

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

Submission status: Accepted

Solution code:
import math

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

if x*1.08//1 == N:
  print(x)

else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
import math
if N%(1.08)==0:
    print(int(N/1.08))
else:
    a=N//1.08+1
    b=math.floor(a*1.08)
    if N==b:
        print(int(a))
    else:
        print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

import math

n = int(input())

tmp=0
if n%27==0:
    tmp=int(n*25/27)
elif (n+1)%27==0:
    tmp=int((n+1)*25/27)-1
else:
    tmp=math.ceil(n*25/27)

if math.floor(tmp*1.08)==n:
    print(tmp)
else:
    print(":(")

Submission status: Accepted

Solution code:
#N <= 1.08 * X < N + 1
import math as m
N = int(input())

k = N / 1.08
k = round(k)

if m.floor(k * 1.08) == N:
    print(k)
elif m.floor((k-1) * 1.08) == N:
    print(k-1)
elif m.floor((k+1) * 1.08) == N:
    print(k+1)
elif m.floor((k-2) * 1.08) == N:
    print(k-2)
elif m.floor((k+2) * 1.08) == N:
    print(k+2)
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N = int(readline())
  for i in range(50000):
    a = int(i*1.08)
    if a == N:
      print(i)
      break
    else:
      continue
  else:
    print(':(')
  
  
  
if __name__ == '__main__':
  main()

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

Submission status: Accepted

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

while int(n0 * 1.08) < n:
    n0 += 1

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math


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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N = int(input())

cost = N * 100 // 108

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

Submission status: Accepted

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

N = int(input().split()[0])
X = N / 1.08

if math.floor(math.ceil(X) * 1.08) == N:
    ans = math.ceil(X)
elif math.floor(math.floor(X) * 1.08) == N:
    ans = math.floor(X)
else:
    ans = ":("

print(ans)

Submission status: Accepted

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

N = int(input().split()[0])
X = N / 1.08

# if math.floor(math.ceil(X) * 1.08) == N:
#     ans = math.ceil(X)
# elif math.floor(math.floor(X) * 1.08) == N:
#     ans = math.floor(X)
# else:
#     ans = ":("

if math.floor(math.ceil(X) * 1.08) == N:
    ans = math.ceil(X)
elif math.floor(math.floor(X) * 1.08) == N:
    ans = math.floor(X)
else:
    ans = ":("

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

for i in range(1,50001):
    if (i*1.08)//1 == n:
        print(i)
        exit()
    if (i*1.08)//1 > n:
        print(':(')
        exit()

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(1, 50000 + 1):
    if floor(i * 1.08) == n:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    for x in range(n//2,n+1):
        if x*1.08//1==n:
            print(x)
            break
    else:print(":(")

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
stp = int(n/1.08)
while True:
  cost = int(stp*1.08)
  if cost == n:
    ans = stp
    break
  elif cost > n:
    ans = ':('
    break
  else:
    stp += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
t = int(N / 1.08)
while True:
    if int(t*1.08) == N:
        print(t)
        break
    if int(t*1.08) > N:
        print(":(")
        break
    t += 1

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
N=int(input())
genka=float(N)/1.08
genka2=float(math.floor(genka))
genka3=float(math.ceil(genka))
N2=math.floor(genka2*1.08)
N3=math.floor(genka3*1.08)
if N2==N:
    print(int(genka2))
elif N3==N:
    print(int(genka3))
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
lowx=-(-n*100//108)
highx=-(-(n+1)*100//108)

if lowx<highx:
  print(lowx)
else:
  print(':(')

Submission status: Accepted

Solution code:
N = int(input())

if N%1.08 ==0:
    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:
import math
N=int(input())
#print(N*100/108)
if N * 100 % 108 == 0:
    print(N*100//108)
else:
    kouho=N * 100 // 108
    for i in range(-1,2):
        #print(math.floor((kouho + i) * 1.08))
        if N == math.floor((kouho + i) * 1.08):
            print(kouho + i)
            exit()
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

result = math.floor(x * 1.08)
if (result == n):
    print(x)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:

X = int(input())

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

Submission status: Accepted

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

for i in range(mx):
    if math.floor(i*1.08) == n:
        print(i)
        exit()
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

f = False
for i in range(n+1):
    if int(i*1.08)==n:
        print(i)
        f = True
        break
if not f:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:


end_price = int(input())
price = end_price/1.08
price = int(price)

start_price = [price, price+1, price-1]
prices = [int(price*1.08), int((price+1)*1.08), int((price-1)*1.08)]

for ind, x in enumerate(prices):
    if x == end_price:
        print(start_price[ind])
        exit(0)
print(":(")

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"
N = int(input())

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

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

N = int(input())

count =0

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

N = int(input())

import math
lower = math.floor(N / 1.08)
upper = math.ceil(N / 1.08)
if math.floor(lower * 1.08) == N:
    print(lower)
elif math.floor(upper * 1.08) == N:
    print(upper)
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
#from sys import stdin
#import math
#from functools import reduce
    
#A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
N = int(input())
#S = list(input())
 
#is_exist = 'Yes'

n = int(N / 1.08)
out = str(n)
#print(N/1.08)
#
if (n*1.08) < N:
    out = ':('
    
if ((n+1)*1.08) < N+1:
    out = str(n+1)

print(out)

Submission status: Accepted

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

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

print(":(")

Submission status: Accepted

Solution code:
n = int(input())
res = 0
for i in range(50001):
  if int(i * 1.08) == n:
    res = i
if res != 0:
  print(res)
else:
  print(':(')

Submission status: Accepted

Solution code:
import math
N=int(input())
c=math.ceil(N*100/108)
f=((N+1)*100/108)
if c<f:
    print(c)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
x0 = n * 100 / 108
x1 = (n+1) * 100 / 108

if x0.is_integer():
    print(math.floor(x0))
elif x1.is_integer():
    print(':(')
elif math.floor(x0) != math.floor(x1):
    print(math.floor(x1))
else:
    print(':(')

Submission status: Accepted

Solution code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = True

n = INT()
xx = int(n // 1.08 - 5)
for x in range(xx, xx + 10):
    if int(x * 1.08) == n:
        print(x)
        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(':(')
else:
    print(ans)
# print(math.ceil(N/1.08))
# print(int(math.ceil(N/1.08)*1.08))

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())
k = 0
import math
for i in range(1, N+1):
    if math.floor(i*1.08) == N:
        print(i)
        k = 1
        break
if k ==0 :
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())

flag = False
ans = 0
for i in range(50001):
    if int(i * 1.08) == n:
        flag = True
        ans = i
        break
print(ans if flag else ":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
n=int(input())
x=[(i*108)//100 for i in range(1,n+1)]
if n in x:
  print(bisect.bisect_left(x,n)+1)
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

ans = n // 1.08
for i in range(int(ans)-10, int(ans)+10):
    if int(i * 1.08) == n:
        print(i)
        exit()
print(":(")

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:
        ans = i
        break
if ans == 0:
    print(":(")
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

Ndict={}
for i in range(50000):
    price=int(i*1.08)
    Ndict[price]=i

if N in Ndict.keys():
    print(Ndict[N])
else:
    print(":(")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

x_can = n/1.08

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

elif math.floor(math.ceil(x_can)*1.08) ==  n:
    print(math.ceil(x_can))
else:
    print(":(")

Submission status: Accepted

Solution code:
from math import floor, ceil

N = int(input())

def g(x):
    return ceil(x*100/108)

def v(x):
    return floor(x*1.08)

expected_X = g(N)
value = v(expected_X)

if N == value:
    print(expected_X)
else:
    print(":(")

Submission status: Accepted

Solution code:
# sumitb2019_b.py
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

N = int(input())
for x in range(N + 1):
    if x * 108 // 100 == N:
        print(x)
        break
else:
    print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
flag = True
for i in range(N, 0, -1):
  if int(i*1.08) == N:
    print(i)
    flag = False
    break
if flag:
  print(':(')

Submission status: Accepted

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

print(':(')

Submission status: Accepted

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

if 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 = int(n/1.08)

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

Ans=[]
for i in range(N+1):
    j=i*1.08
    if int(j)==N:
        Ans.append(i)
        
if len(Ans)!=0:
    print(Ans[0])
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
counter = False
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:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

    while True:
        if N<=x*1.08<N+1:
            print(x)
            break
        elif x>N:
            print(':(')
            break
        else:
            x+=1
            



resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1,1000000):
  if  int(i * 1.08) == n:
    print(i)
    exit(0)
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(ans)
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
f = int(n/1.08)
a = True
for i in range(f-5,f+5):
    if int(i * 1.08)==n:
        print(i)
        a = False
        break
if a:
    print(':(')

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())

x = N / 1.08
c = int(np.ceil(x))
f = int(np.floor(x))
if int(c * 1.08) == N:
  print(c)
elif int(f * 1.08) == N:
  print(f)
else:
  print(':(')

Submission status: Accepted

Solution code:
n = int(input())

if (n + 1) % 108 == 0:
    print(':(')
else:
    if n % 108 == 0:
        print(n // 108 * 100)
    else:
        a = int(n / 1.08)
        for i in range(a, a + 3):
            s = i * 1.08
            if n <= s and s < n + 1:
                print(i)
                break
            if i == a + 2:
                print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if math.floor(math.floor(N/1.08) * 1.08) == N:
    print(math.floor(N/1.08))
    exit()
if math.floor((math.floor(N/1.08)+1) * 1.08) == N:
    print(math.floor(N/1.08)+1)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math


N = int(input())

for x in range(50000):
    n = math.floor(x * 1.08)
    if (n == N):
        print(x)
        break
    elif (n > N):
        print(':(')
        break

Submission status: Accepted

Solution code:
import math
N = int(input())
ans = ""
for x in range(1, N+1):
  if math.floor(x * 1.08) == N:
    ans = x
print(ans if ans != "" else ":(")

Submission status: Accepted

Solution code:
import math
def myAnswer(N:int):
   return math.ceil(N/1.08) 

def modelAnswer():
   tmp=1
def main():
   N = int(input())
   ans = myAnswer(N)
   if(N == math.floor(ans*1.08)):
      print(ans)
   else:
      print(":(")

if __name__ == '__main__':
   main()

Submission status: Accepted

Solution code:
import math

N = int(input())

if (N+1) % 27 == 0 or (N+14) % 27 == 0:
    print(':(')
else:
    print(math.floor((N+0.99)/1.08))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    i = 0
    while i < 50000:
        if int(i * 1.08) == N:
            return(i)
            break
        i += 1
    return(":(")
print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# ここから書き始める
n = float(input())
ans = int(n / 1.08)
if int(ans * 1.08) == n:
    print(ans)
elif int((ans + 1) * 1.08)== n:
    print(ans + 1)
elif int((ans - 1) * 1.08)== n:
    print(ans - 1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	n = II()
	ch = False
	for i in range(n+1):
		if(n==int(i * 1.08)):
			print(i)
			ch = True
			break
	if ch==False:
		print(":(")


if __name__ == '__main__':
	main()