Problem:


Score : 100 points

Problem Statement

On some day in January 2018, Takaki is writing a document. The document has a column where the current date is written in yyyy/mm/dd format. For example, January 23, 2018 should be written as 2018/01/23.

After finishing the document, she noticed that she had mistakenly wrote 2017 at the beginning of the date column. Write a program that, when the string that Takaki wrote in the date column, S, is given as input, modifies the first four characters in S to 2018 and prints it.

Constraints

S is a string of length 10.

The first eight characters in S are 2017/01/.

The last two characters in S are digits and represent an integer between 1 and 31 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

Replace the first four characters in S with 2018 and print it.

Sample Input 1

2017/01/07

Sample Output 1

2018/01/07

Sample Input 2

2017/01/31

Sample Output 2

2018/01/31



Sample input:
2017/01/07


Sample output:
2018/01/07

Submission status: Runtime Error

Solution code:
print(len(set[(int(input()) for i in range(int(input()))])))

Submission status: Runtime Error

Solution code:
print(len(set(int(input()) for i in range(int(input())))))

Submission status: Runtime Error

Solution code:
numbers = list(map(int,input().split()))
N = numbers[0]
Y = numbers[1]
a,b,c = -1,-1,-1
for i in range(N+1):
  for j in range(N+1-i):
    if 10000*i + 5000*j + 1000*(N-i-j) == Y:
      a,b,c = i,j,N-i-j
      break
  else:
    continue
  break
print(a,b,c)

Submission status: Runtime Error

Solution code:
numbers = list(map(int,input().split()))
N = numbers[0]
Y = numbers[1]
for i in range(N+1):
  for j in range(N+1-i):
    if 10000*i + 5000*j + 1000*(N-i-j) == Y:
      print(i,j,N-i-j)
      exit()
print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
N_n_osatsu, Y_sum_money = map(int, input().split())

rest_money = Y_sum_money
rest_n_osatsu = N_n_osatsu
n_each_osatsu_list = [] # 万札、五千円札、千円札の枚数の2重リスト

def skip_search(rest_money, rest_n_osatsu):  # 明らかに無理な場合、処理をスキップ
    if rest_n_osatsu*1000 > rest_money or rest_n_osatsu*10000 < rest_money:
        return True

def is_answer(n_10000, n_5000, n_1000): # 正答ならばそれを出力して終了
    if n_10000 + n_5000 + n_1000 == N_n_osatsu and n_10000*10000 + n_5000*5000 + n_1000*1000 == Y_sum_money:
        print(n_10000, n_5000, n_1000)
        exit()

for n_10000 in range(min(Y_sum_money//10000, N_n_osatsu)+1): # 万札枚数。0枚からスタート
    is_answer(n_10000, 0, 0)
    rest_money = Y_sum_money - 10000*n_10000
    rest_n_osatsu = N_n_osatsu - n_10000
    if skip_search(rest_money, rest_n_osatsu):
        break

    for n_5000 in range(min(rest_money//5000 + 1, rest_n_osatsu)+1): # 万札枚数決定後に5000円の枚数を探索。5000円0枚からスタート
        is_answer(n_10000, n_5000, 0)
        rest_money = Y_sum_money - 10000*n_10000 - 5000*n_5000
        rest_n_osatsu = N_n_osatsu - n_10000 - n_5000
        if skip_search(rest_money, rest_n_osatsu):
            break
        n_1000 = rest_money//1000
        is_answer(n_10000, n_5000, n_1000)

print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
N = int(input())
d_list = [int(input()) for _ in range(N)]
print(len(set(d_list)))

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 1
d = []
for i in range(N):
  d.append(int(input()))
sorted(d,reverse=True)
print(set(d))

Submission status: Runtime Error

Solution code:
n,Y = map(int,input().split())
x = -1
y = -1
z = -1

for i in range(Y//10000 + 1):
    for j in range(n-i+1):
        if 9*i + 4*j == Y/1000 - n:
            x = i
            y = j
            z = n-i-j
print(x,y,z)

Submission status: Runtime Error

Solution code:
s=int(input())
print("2018"+[:4])

Submission status: Runtime Error

Solution code:
s = input()
print(s.replace('2017','2018')

Submission status: Runtime Error

Solution code:
NY = input().split(" ")
N = int(NY[0])
Y = int(NY[1])
KKK = 0
KK = 0
K = 0
check = 0
for i in range(0, N):

    if check == 1:
        break
    for j in range(0, N - i):
        k = N - i - j #kは千円
        if k * 10000 + j * 5000 + i * 1000 == Y and i + j + k == N:
            KKK = k
            KK = j
            K = i
            check = 1
            break
        
if check == 0:
    print(-1, -1, -1)
else:
    print(K, KK ,KKK)

Submission status: Runtime Error

Solution code:
y,m,d = int(input().split("/"))

print(2018+"/"+m+"/"+d)

Submission status: Runtime Error

Solution code:
print(input().replace(s[3],'8'))

Submission status: Runtime Error

Solution code:
s = input()
s[3]=7
print(s)

Submission status: Runtime Error

Solution code:
S = input()
print('2018'+s[4:])

Submission status: Runtime Error

Solution code:
print("2018"+input([4:]))

Submission status: Runtime Error

Solution code:
L = input().split()
N = int(L[0])
Y = int(L[1])
c = -1
d = -1
e = -1
for a in range(N + 1):
    for b in range(N + 1):
        if 10000*a + 5000*b + 1000*(N - a - b) == Y and N - a - b >= 0:
            c = a
            d = b
            e = N - a - b
        else:
            pass
print(str(c) + " " + str(d) + " " + str(e))

Submission status: Runtime Error

Solution code:
S=int(input())
print(2018+S[4::])

Submission status: Runtime Error

Solution code:
S = input()
S[3] = 8
print(S)

Submission status: Runtime Error

Solution code:
s = input()
s_list = list(s)
s_list[3] = "8"
print("",join(s_list))

Submission status: Runtime Error

Solution code:
s = input()
s.replace("2017","2018)

Submission status: Runtime Error

Solution code:
S = list(input())
S[3] = 8
print("".join(S))

Submission status: Runtime Error

Solution code:
num = input().split()
 
n = int(num[0])
y = int(num[1])

m = 0
g = 0
s = 0

flag = False


for i in range(n+1):
    if flag:
        break
    m = i
    
    for e in range(n+1):
        if flag:
            break
        g = e
        
        me = m * 10000
        ge = g * 5000
        
        tmpS =  y - (me+ge)
        
        if (tmpS / 1000) + (m+g) == n and me+ge+tmpS == y and (tmpS / 1000) >= 0:
            flag = True
            ma = m
            ga = g
            if tmpS / 1000 > 0:
                sa = tmpS / 1000
                sa = int(sa)
            else: 
                sa = 0
if flag:
    print(ma,ga,sa)
else:
    print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
N, Y =map(int,input().split(" "))
for i in range(N+1):
    for j in range(N-i+1):
        if i * 10000 + j*5000 + (N-i-j)*1000 ==y:
            print(i, j, N-i-j)
            exit()
print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
    if i*10000 <= Y:
        charge = Y - i*10000
        rest = N - i
        for j in range(rest,-1,-1):
            if j*5000 <= charge:
                if charge - j*5000 - (rest-j)*1000 == 0:
                    print('{0} {1} {2}'.format(i, j ,rest-j))
                    exit(0)
print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
    if i*10000 <= Y:
        charge = Y - i*10000
        rest = N - i
        for j in range(rest,-1,-1):
            if j*5000 <= charge:
                if charge - j*5000 - (rest-j)*1000 == 0:
                    print(f'{i} {j} {rest-j}')
                    exit(1)
print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
S=str(input())

S[3]=8

print(S)

Submission status: Runtime Error

Solution code:
n = int(input())
n_list =[]
for i in range(n+1):
  n_list.append(int(input()))
print(len(set(n_list)))

Submission status: Runtime Error

Solution code:
n = int(input())
n_list =[]
for i in range(n+1):
  n_list.append(int(input()))
print(len(lset(n_list)))

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split())

for i in range(int(round(y/10000, 0)) + 1):
    for j in range(int(round(y/5000, 0)) + 1):
        for k in range(int(round(y/1000, 0)) + 1):
            if i+j+k > n:
                break
            elif (10000*i) + (5000*j) + (1000*k) == y and i+j+k == n:
                print(i, j, k)
                exit()

print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
n = int(input())
a = set([input() for i in range(n)])
print(len(a))

Submission status: Runtime Error

Solution code:
n = int(input())
d = set([int(input()) for i in range(n)])
print(len(d))

Submission status: Runtime Error

Solution code:
print(len(set([int(input()) for _ in range(int(input()))])))

Submission status: Runtime Error

Solution code:
print(len(set([int(input()), for _ in range(int(input()))])))

Submission status: Runtime Error

Solution code:
print(len(set[int(input()), for _ in range(int(input()))]))

Submission status: Runtime Error

Solution code:
print(len(set[int(input()), for _ in range(int(input())]))

Submission status: Runtime Error

Solution code:
i = input()
i = i.split(" ")
n = int(i[0])
y = int(i[1])
y = y / 1000
cn = []

for c in range(int(((y-n) // 9))+1):
  if ((y-n-9*c) // 4) == 0:
    cn.append([int((y-n-9*c) / 4), c])
  else:
    pass
  
if(len(cn) == 0):
  rs = [-1, -1, -1]
else:
  j = cn[0]
  a = n - j[0] - j[1]
  if a >= 0:
    rs = [a, j[0], j[1]]
  else:
    rs = [-1, -1, -1]

print(str(rs[2]) + " " + str(rs[1]) + " " + str(rs[0]))

Submission status: Runtime Error

Solution code:
print(len(set([int(input())for _ in range(int(input()))])))

Submission status: Runtime Error

Solution code:
s=str(input())
s[3]="8
print(s)

Submission status: Runtime Error

Solution code:
 S = input().split("/")
S[0] = "2018"

print("/".join(S))

Submission status: Runtime Error

Solution code:
n=input()
l=[int(input()) for i in range(n)]
s=set(l)
print(len(s))

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split())
b = [-1, -1, -1]
count = 0
for i in range(n + 1):
  for j in range(n + 1):
    k = n - i - j
    if k < 0:
      break
    total = 10000 * i + 5000 * j + 1000 * k
    count += 1
    if total == y and (i + j + k) == n:
      b = [i, j, k]
      break
print(b)

Submission status: Runtime Error

Solution code:
nm = list(map(int,input().split()))
n = nm[0]
m = nm[1]

y1 = 1000
y2 = 5000
y3 = 10000

for x1 in range(n+1):
	for x2 in range(n+1-x1):
		if m == x1*y1 + x2*y2 + (n - x1 - x2)*y3 :
			print(x1,x2,(n - x1 - x2))
			exit()
print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
n, total = map(int, input().split())

x = -1
y = -1
z = -1

for a in range(n+1):  #10000
    for b in range(n-a+1):  #5000
        c = n-a-b
        if total == 10000 * a + 5000 * b + 1000 * c:
            x, y, z = a, b, c
            break

print(x, y, z)

Submission status: Runtime Error

Solution code:
N, Y = list(map(int, input().split()))

N1000 = -1
N5000 = -1
N10000 = -1

flag = False
for i in range(N+1):
    for j in range(N-i+1):
        k = N-i-j
        if 1000*i+5000*j+10000*k == Y:
            N1000 = i
            N5000 = j
            N10000 = k
            flag = True
            break
    if flag:
        break

print(N10000,N5000,N1000)

Submission status: Runtime Error

Solution code:
s = input()

s[3] = '8'
print(s)

Submission status: Runtime Error

Solution code:
N,Y = map(int,input().split())

for x in range(N+1):
  for y in range(N+1):
    z = N - x - y
    if z < 0:
      continue
    if 10000 * x + 5000 * y + 1000 * z == Y:
      print(x,y,z)
      exit()

print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split())

#print(a,b)
#10000,5000,1000

i=0
j=0
flag=0
while i< a:
  j=0
  while j < a-i:
    k=a-i-j
    #print(i,j,k)
    
    if 10000*i+5000*j+1000*k==b:
      print(i,j,k)
      flag=1
      break
    
    if flag==1:
      break
    j=j+1
  if flag==1:
    break
  
  i=i+1
if flag==0:
  print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
a = input().split()
print("2018/"+a[1]+"/"+a[2])

Submission status: Runtime Error

Solution code:
N = int(input())
dL = []
 
for n in range(N):
  dL.append(int(input()))

dL.sort()
counter = 0
 
for n in range(N-1):
  n = n + 1
  if dL[n-1] == dL[n]:
    pass
  else:
    counter += 1
 
if counter == 0:
  counter = 1
 
print(counter)

Submission status: Runtime Error

Solution code:
n, y = map(int, input().rstrip().split())
a, b, c = -1, -1, -1

for i in range(n+1):
    for j in range(n+1-i):
        if 10000*i + 5000*j + 1000*(n-i-j) ==  y:
            a, b, c = i, j, n-i-j
            break
    else:
        continue
    break
print(a, b, c)

Submission status: Runtime Error

Solution code:
yukichi_num = 0
ichiyou_num = 0
a,b = map(int,input().split())
for i in range(a+1):
    for  n in range(a+1-i):
        if i*10000+n*5000+1000*(a-i-n) == b:
            print('{0} {1} {2}'.format(i,n,a-i-n))
            exit()
print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
(N, Y) = map(lambda x: int(x), input().split(' '))
Y /= 1000

limit = 10*N

if limit < Y:
    print(-1, -1, -1) 
    exit(0)
elif Y == limit:
    print(N, 0, 0)
    exit(0)

_N = limit-Y
for i in range(0, int(_N/9)+1):
    yy = _N - 9*i 
        
    if yy % 5 == 0:
        k = int(yy/5)
        if N-k-i > 0:
            print(N-k-i, k, i)
            exit(0)

print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
(N, Y) = map(lambda x: int(x), input().split(' '))
Y /= 1000

limit = 10*N

if limit < Y:
    print(-1, -1, -1) 
elif Y == limit:
    print(N, 0, 0)

_N = limit-Y
for i in range(0, int(_N/9)+1):
    yy = _N - 9*i 
        
    if yy % 5 == 0:
        k = int(yy/5)
        if N-k-i > 0:
            print(N-k-i, k, i)
            exit(0)

print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
yukichi_num = 0
ichiyou_num = 0
a,b = map(int,input().split())
while (b >= 10000) and (a > 0):
    b -=10000
    yukichi_num += 1
    a -= 1
while (b >= 5000) and(a > 0):
    b -= 5000
    ichiyou_num += 1
    a -= 1
if (b/1000) <= a:
    print('{0} {1} {2}'.format(yukichi_num,ichiyou_num,int(b/1000)))
else:
    print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
yukichi_num = 0
ichiyou_num = 0
a,b = map(int,input().split())
while (b >= 10000) and (a > 0):
    b -=10000
    yukichi_num += 1
    a -= 1
while (b >= 5000) and(a > 0):
    b -= 5000
    ichiyou_num += 1
    a -= 1
if (b//1000) <= a:
    print('{0} {1} {2}'.format(yukichi_num,ichiyou_num,int(b/1000)))
else:
    print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
# coding:utf-8

n, y = [int(x) for x in input().split(' ')]

sen = y//1000

target = sen - n

if target < 0:
    print('-1 -1 -1')
else:
    iti_man = target % 4
    go_sen = target // 4 - iti_man * 2
    sen = sen - iti_man * 10 - go_sen * 5
    if sen > -1 and go_sen > -1 and iti_man > -1 :
        print('{} {} {}'.format(iti_man, go_sen, sen))
    else:
        print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
n, y = [int(x) for x in input().split(' ')]

q, mod = divmod(y, 10000)
if n * 10000 > y:
    print('-1 -1 -1')
else:
	if q == n and mod == 0:
		print('{} 0 0'.format(q))
	else:
		for a in range(q+1):
			b = int((y - 1000 * n - 9000 * a) / 4000)
			c = int((5000 * n - y + 5000 * a) / 4000)
			if a + b + c == n and a >= 0 and b >= 0 and c >= 0:
				print('{} {} {}'.format(a, b, c))
				break

Submission status: Runtime Error

Solution code:
n, y = [int(x) for x in input().split(' ')]

q, mod = divmod(y, 10000)
if q == n and mod == 0:
    print(q, 0, 0)

for a in range(q+1):
    b = int((y - 1000 * n - 9000 * a) / 4000)
    c = int((5000 * n - y + 5000 * a) / 4000)
    if a + b + c == n and a >= 0 and b >= 0 and c >= 0:
        print(a, b, c)

Submission status: Runtime Error

Solution code:
y,m,d=map(input().split("/"))
print(str(y+1)+"/"+str(m)+"/"+str(d))

Submission status: Runtime Error

Solution code:
s = input()
s[:4] = "2018"
print(s)

Submission status: Runtime Error

Solution code:
# お札の枚数及び合計金額を入力
N, Y = map(int, input().split())
# それぞれのお札の枚数の初期値を設定
A = -1 # 10000円札
B = -1 # 5000円札
C = -1 # 1000円札
# お札の合計金額を計算する関数を定義
def amount(A, B, C):
    return A * 10000 + B * 5000 + C * 1000
# 10000円札を1枚ずつ増やす
for a in range(0, N + 1):
    # 他が全て1000円札でもYを超えてしまう場合、繰り返し終了
    if amount(a, 0, N - a) > Y:
        break
    # 他が全て5000円札でもYに届かない場合、5000円札の繰り返しには進まない
    if amount(a, N - a, 0) < Y:
        continue
    for b in range(0, N - a + 1):
        # お札の合計金額がYと一致した場合、お札の枚数を更新し、繰り返しを終了する
        if amount(a, b, N - a - b) == Y:
            A = a
            B = b
            C = N - a - b
            break
    else:
        continue
    break
# 出力する
print("{} {} {}".format(A, B, C))

Submission status: Runtime Error

Solution code:
S = input()
S[3] = 8
print(S)

Submission status: Runtime Error

Solution code:
# ABC 85, C - otoshidama

def answer():
    n, y = map(int, input().split(' '))
    for i in range(n+1):
        for j in range(0, n-i+1):
            total = 10000 * i + 5000 * j + 1000 * (n-i-j)
            if total == y:
                return '{} {} {}'.format(i, j, n-i-j)


    return '{} {} {}'.format(-1, -1, -1)
print(answer())

Submission status: Runtime Error

Solution code:
s = input()

ans = ""
for i in range(len(s)):
  if (i == 3) ans += "8"
  else ans += s[i]
 

print (ans)

Submission status: Runtime Error

Solution code:
n,y=map(int,input().split())
y=y/1000
count=0
for i in range(y/10):
    for j in range(int(y-10*i)):
        for k in range(int(y-10*i-5*j)):
            if i+5*j+10*k==y:
                print(str(k)+" "+str(j)+" "+str(i))
                count=1
                break
        if count==1:
            break
    if count==1:
        break
if count==0:
    print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
n,y = map(int,input().split())
ans_a = -1
ans_b = -1
ans_c = -1

for i in range(n+1):
  for j in range(n+1):
    x = y - 10000*i - 5000*j
    if x % 1000 == 0:
      k = x / 10000
      ans_a = i
      ans_b = j
      ans_c = k
print(ans_a,ans_b,ans_c)

Submission status: Runtime Error

Solution code:
n,y = map(int,input().split())
ans_a = -1
ans_b = -1
ans_c = -1

for i in range(n+1):
  for j in range(n+1-i):
    x = y - 10000*i - 5000*j
    if x % 10000 == 0:
      k = x / 10000
      ans_a = i
      ans_b = j
      ans_c = k
print(ans_a,ans_b,ans_c)

Submission status: Runtime Error

Solution code:
n,y = map(int,input().split())
 
y /= 1000
 
y10 = 0
y5 = 0
y1 = 0
 
i = 0
#i,j,k = 10000,5000,1000
while 1:
    y1 = i
    y5 = (10*n-y-9*y1)//5
    y10 = n-y5-y1
    if (10*n-y-9*y1)%5 == 0 and y10>=0 and y5>=0 and y1>=0:
        print(int(y10),int(y5),int(y1))
        break
    i += 1
    if i>n:
        print(-1,-1,-1)
        break

Submission status: Runtime Error

Solution code:
S=input()
S[3]='8'
print(S)

Submission status: Runtime Error

Solution code:
S = input()
print(S.replace('2017/01/', '2018/01/')

Submission status: Runtime Error

Solution code:
x = input()
x[0],x[1],x[2],x[3] = "2","0","1","8"
print(x)

Submission status: Runtime Error

Solution code:
N, Y = map(int, input().split())

'''
if Y/N > 10000 or Y%1000 != 0:
  print("-1 -1 -1")
'''
flag = 0
  
for x in range(N+1):
  x = x
  if flag == 1:
    break
  for y in range(N-x+1):
    y = y
    z = N-x-y
    if x*10000+y*5000+z*1000 == Y:
      print(x,y,z)
      flag = 1
      break

if flag == 0:
  print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
l = list(input())
print('2018'+l.[4:])

Submission status: Runtime Error

Solution code:
l = list(input())
print('2018',[4:])

Submission status: Runtime Error

Solution code:
result_lis = list( map(int,input().split()) )
N,T = result_lis

def solve(n,total):
    sen = n * 1000
    if total < sen:
        return [-1,-1,-1]
    
    sa = total - sen
    kyu = sa // 9000
    
    for i in range(kyu+1):
        zan = total - (kyu*10000 + (n-kyu)*1000)
        if zan % 4000 == 0:
            return [kyu,zan//4000,(n-kyu-zan//4000)]
    return [-1,-1,-1]
    
print(' '.join(map(str,solve(N,T))))

Submission status: Runtime Error

Solution code:
s = input()
s[3] = '7'
print(s)

Submission status: Runtime Error

Solution code:
from sys import stdin
N,Y = [int(x) for x in stdin.readline().rstrip().split()]
flag = False
for x in range(N+1):
    for y in range(N+1):
        z = N - x - y
        if Y == 10000 * x + 5000 * y + 1000 * z:
            flag = True
            break
    else:
        continue
    break
if flag:
    print(x,y,z)
else:
    print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
x=input()
x[3]=8
print(x)

Submission status: Runtime Error

Solution code:
S = input()
S[0:4] = "2018"
print(S)

Submission status: Runtime Error

Solution code:
n, h, *t=map(int,open(0).read().split())
a = t[::2]
b = t[1::2]
ma = max(a)
b_high = [i for i in b if i > ma]
if sum(b_high) > h:
  ans = 0
  b_high = sorted(b_high)
  while h < 0:
    h = h - b_high.pop()
    ans += 1
  print(ans)
else:
  if (h - sum(b_high)) % ma == 0:
    print(len(b_high) + (h - sum(b_high)) // ma)
  else:
    print(len(b_high) + ((h - sum(b_high)) // ma) + 1)

Submission status: Runtime Error

Solution code:
y,m,d = input().split("/")
print("2018/"+m"/"+d if y == "2017" else y+"/"+m"/"+d)

Submission status: Runtime Error

Solution code:
import sys
n, y = (int(i) for i in input().split())

for i_10000 in range(0, n + 1):
  for i_5000 in range(0, n + 1):
    i_1000 = n - i_10000 - i_5000
    if (i_10000 * 10000 + i_5000 * 5000 + i_1000 * 1000 == y) and i_10000 + i_5000 + i_1000 == n:
      print(i_10000, i_5000, i_1000)
      sys.exit()
      
print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
import sys
n, y = (int(i) for i in input().split())

for i_10000 in range(0, n + 1):
  for i_5000 in range(0, n + 1):
    i_1000 = n - i_10000 - i_5000
    if (i_10000 * 10000 + i_5000 * 5000 + i_1000 * 1000 == y) and i_10000 + i_5000 + i_1000 == n:
      print(i_10000, i_5000, i_1000)
      sys.exit()
      
print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
N, Y = map(int, input().split())
for i in range(N+1):
    for j in range(N+1):
        if (N - i - j) * 10000 + i * 5000 + j * 1000 == Y:
            print(N - i - j, i, j)
            exit()
print(-1, -1, -1)

Submission status: Runtime Error

Solution code:
S = input()
S[3] = "8"
print(S)

Submission status: Runtime Error

Solution code:
#include<stdio.h>
#include <string>

int main(){
    char *s;
    scanf("%s",s);
    s[0] = '2';
    s[1] = '0';
    s[2] = '1';
    s[3] = '8';
    printf("%s" ,s);
    return 0;
}

Submission status: Runtime Error

Solution code:
n, y = map(int, input().split(' '))
s_n = [0, 0, 0]
s_l = [10000, 5000, 1000]
error = '-1 -1 -1'

for i, s in enumerate(s_l):
    if n > -1:
        s_n[i] = int(y/s)
        n = n - s_n[i]
        y = y - s * s_n[i]
    else:
        ans = error
 
if n > -1:
    if list(set(s_n)) == [0]:
        ans = error
    elif y == 0:
        ans = ' '.join(map(str, s_n))
    else:
        ans = error
else:
    ans = error

print(ans)

Submission status: Runtime Error

Solution code:
N,Y=map(int,input().split())
for i in range(N+1):
    for j in range(N-i+1):
        #print(10000*i+5000*j+1000*(N-i-j)
        if 10000*i+5000*j+1000*(N-(i+j))==Y:
            
            a=i
            b=j
            c=N-(i+j)
            #print(str(i)+" "+str(j)+" "+str(N-(i+j)))
            break
        else:
            a=-1
            b=-1
            c=-1
            #print(str(-1)+" "+str(-1)+" "+str(-1))
print(str(a)+" "+str(b)+" "+str(c))

Submission status: Runtime Error

Solution code:
N,Y=map(int,input().split())
for i in range(N+1):
    for j in range(N-i+1):
        if 10000*i+5000*j+1000*(N-(i+j))==Y:
            
            #print(str(i)+" "+str(j)+" "+str(N-(i+j)))
            break
        else:
            i=-1
            j=-1
            #print(str(-1)+" "+str(-1)+" "+str(-1))
            pass
print(str(i)+" "+str(j)+" "+str(N-(i+j)))

Submission status: Runtime Error

Solution code:
import sys
N, Y = map(int,input().split())

for i in range (N+1):
    for j in range (N+1):
        if  1000*i + 5000*j + 10000*(N-i-j) == Y:
            print('%d %d %d'%(i,j,(N-i-j)))
            sys.exit()
print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
h = [int(s) for s in input().split()]
N = h[0]
Y = h[1]

def otoshidama(a,b):
	ok_flag = 0
	money = 0
	for i in range(N+1):
  		for j in range(N+1-i):
      		money = 10000*i + 5000*j + 1000*(N-i-j)
      		if money == Y:
        		print(i,j,N-i-j)
        		ok_flag = 1
        		return
      		money = 0 
	if ok_flag == 0:
  		print(-1 -1 -1)
  
otoshidama(N,Y)

Submission status: Runtime Error

Solution code:
from sys import stdin

def calc(N, Y):
    for i in range(N+1):
        for j in range(N+1-i):
            if 10000*i + 5000*j + 1000*(N-i-j) == Y:
                return '%s %s %s' % (i, j, (N-i-j))
    return '-1 -1 -1'

if __name__ == '__main__':
    N, Y = [int(x) for x in stdin.readline().rstrip().split()]
    print(calc(N, Y))

Submission status: Runtime Error

Solution code:
N,Y = map(int,input().split())
for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x+5000*y+1000*(N-x-y)==Y:
            print(x,y,N-x-y)
            exit()
print(-1,-1,-1)

Submission status: Runtime Error

Solution code:
import sys
N, Y = map(int, input().split())
for a in range(N+1):
    for b in range(N+1):
        c = N - a - b
        if c < 0:
            continue
        if (10000*a + 5000*b + 1000*c) == Y:
            print(str(a)+" "+str(b)+" "+str(c))
            sys.exit()
print("-1 -1 -1")

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    d = []

    for i in range(0, n):
        d.append(int(input()))

    backet = {}
    for i in range(0, 101):
        backet[i] = 0

    for i in range(0, n):
        backet[d[i]] += 1

    count = 0
    for i in range(0, 101):
        if backet[i] > 0:
            count += 1

    print(count)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N, Y = map(int,input().split())

res10000 = -1; res5000 = -1; res1000 = -1

for a in range(N):
    for b in range(N-a):
        c = N - (a + b)
        total = int(10000 * a + 5000 * b + 1000 * c)
        if total == Y and a>=0 and b>=0 and c>=0 :
            res10000 = a; res5000 = b ; res1000 = c
            
print(res10000, res5000, res1000)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# input
n, y = map(int, input().split())

for i in range(0, n + 1):
    for j in range(0, n + 1 - i):
        if y == 10000 * i + 5000 * j + 1000 * (n - i - j):
            print(i, j, n - i - j)
            exit()
        elif y < 10000 * i + 5000 * j + 1000 * (n - i - j):
            break

print('-1', '-1', '-1')

Submission status: Runtime Error

Solution code:
S = input()

S[3] = 8
print(S)

Submission status: Runtime Error

Solution code:

# スペース区切りの整数の入力
n, y = map(int, input().split())

i = 0
j = 0
k = 0

l = [-1,-1,-1]
#print(l)

for i in reversed(range(0,n+1)):
    #print('i= %d' % i)
    if  y >= i*10000:
        for j in reversed(range(0,n-i+1)):
            #print('j= %d' % j)
            k = n - i - j
            #print('k= %d' % k)
            if  y == i*10000 + j*5000 + k*1000:
                l = [i, j, k]

#----ここは一つ見つかったら抜けるための命令
#                break
#        else:
#            continue
#        break
#------------------------------------

                #print(l)

print(l[0], l[1], l[2])

Submission status: Runtime Error

Solution code:

# スペース区切りの整数の入力
n, y = map(int, input().split())

i = 0
j = 0
k = 0

l = [-1,-1,-1]
#print(l)

for i in reversed(range(0,n+1)):
    #print('i= %d' % i)
    if  y >= i*10000:
        for j in reversed(range(0,n-i+1)):
            #print('j= %d' % j)
            k = n - i - j
            #print('k= %d' % k)
            if  y == i*10000 + j*5000 + k*1000:
                l = [i, j, k]

#----ここは一つ見つかったら抜けるための命令
                break
        else:
            continue
        break
#------------------------------------

                #print(l)

print(l[0], l[1], l[2])

Submission status: Runtime Error

Solution code:
N, H = map(int, input().split())
weapon = [list(map(int, input().split())) for _ in range(N)]

count = 0

max_atack = -1
for i in range(N):
    max_atack = max(max_atack, weapon[i][0]) 


flag = True
for i in range(N):
    if weapon[i][1] >= max_atack:
        count += 1
        H -= weapon[i][1]
        
        if H <= 0:
            flag = False
            break

if flag:
    if H % max_atack == 0:
        count += H // max_atack
    else:
        count += H // max_atack + 1


print(count)

Submission status: Runtime Error

Solution code:
n=int(input())
d={int(input()) for i in range(n)}
print(len(d))

Submission status: Runtime Error

Solution code:
ny = list(map(int, input().split()))

for i in range(ny[0] + 1):
    for j in range(ny[0] + 1):
        if (1000 * i + 5000 * j <= ny[1]) and ((ny[1] - 1000*i - 5000*j) % 10000 == 0) and \
        ((ny[1] - 1000*i - 5000*j) // 10000 + i + j == ny[0]):
            print(i, j, (ny[1] - 1000*i - 5000*j) // 10000)
            break
    else:
        continue
    break
else:
    print('-1 -1 -1')

Submission status: Runtime Error

Solution code:
import numpy as np


A = list(map(int, input().split()))
N = A[0]
Y = A[1]
Y = Y/1000
Ans = [-1,-1,-1]
for i in range(N+1):
	for j in range(N+1):
		okane = i + 5* j
		if okane + 10*(N-i-j) == Y:
			Ans[0]=(N-i-j)
			Ans[1]=(j)
			Ans[2]=(i)
print(' '.join(map(str, Ans)))

Submission status: Runtime Error

Solution code:
S = list(str(input()))

ans = ''
y = ''

for index, s in enumerate(S):
  y += s
  if index == 3:
    ans = 2018
    break
    
for s in S[4:]:
  ans += s
print(ans)

Submission status: Runtime Error

Solution code:
S = list(input())
print('2017/01/'+S[8:])

Submission status: Runtime Error

Solution code:
date = [for n in input()]
date[3]="8"
date = "".join(date)
print(date)

Submission status: Runtime Error

Solution code:
date = input()
date[3]=8
print(date)

Submission status: Runtime Error

Solution code:
s=input()
s[3]="8"

Submission status: Runtime Error

Solution code:
y, m, d = map(int, input().split('/'))

print(y+1 + "/" + m + "/" + d)

Submission status: Runtime Error

Solution code:
n = input()
s =n.replace(2017,2018)
print(s)

Submission status: Runtime Error

Solution code:
n = input()
n[3] = '8'
print(n)

Submission status: Runtime Error

Solution code:
n = input()
n[3] = '8'
print(str(n))

Submission status: Runtime Error

Solution code:
s = list(int,input().split())
s[3] = 8
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())
d = []
for i in range(n):
    d.append(int(input()))


set = set(d)

print(str(len(set)))

Submission status: Runtime Error

Solution code:
y, m, d = input()
y = '2018'
print(y + '/' + m + '/' + d)

Submission status: Runtime Error

Solution code:
s = input
s[3] = "8"
print(s)

Submission status: Runtime Error

Solution code:
a = input()

a[3] = 8
print(a)

Submission status: Runtime Error

Solution code:
a, b = input().split()

a[3] = 8
print(a+b)

Submission status: Runtime Error

Solution code:
a, b input().split()

a[3] = 8
print(a+b)

Submission status: Runtime Error

Solution code:
n,y = map(int, input().split())

list = [-1, -1, -1]
for i in range(n+1):
    for j in range(n+1-i):
        k = n - i - j
        if y == i*10000 + j*5000 + k*1000:
            list = [i, j, k]
            break
print(list)

Submission status: Runtime Error

Solution code:
#codinf:UTF-8
s = input()
print(s.replace("2017","2018")

Submission status: Runtime Error

Solution code:
N, Y = map(int, input().split())
sum = 0
is_exist = False
for i in range(N+1):
  for j in range(N+1):
    k = N - i - j
    sum = i * 10000 + j * 5000 + k * 1000
    if sum == Y and i + j + k == N:
      printf("{} {} {}".format(i, j, k))
      is_exist = True
      break
  if is_exist:
    break
if is_exist == False:
  print("-1 -1 -1")