output_description stringlengths 15 956 | submission_id stringlengths 10 10 | status stringclasses 3 values | problem_id stringlengths 6 6 | input_description stringlengths 9 2.55k | attempt stringlengths 1 13.7k | problem_description stringlengths 7 5.24k | samples stringlengths 2 2.72k |
|---|---|---|---|---|---|---|---|
Replace the first four characters in S with `2018` and print it.
* * * | s130615362 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print(str(input()).replace("7", "8", 1))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s263689655 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("/".join(input().split()[1:]))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s856392046 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s = input()
pirnt(s[0:3]="7" + s[4:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s262287847 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
print(S.replace('2017','2018') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s766100289 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2018/01/", input()[8:], end="")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s462793325 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print(f"{2018}{input()[4:]}")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s229469835 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
print(S[3]="8")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s083260100 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s=input()
print(s[:2]+"8"+s[4:] | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s169172754 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace('017','018') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s052890489 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2018/01/" + input()[-2])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s371135630 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | #!/usr/bin/env python3
import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random # random, uniform, randint, randrange, shuffle, sample
# import string # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict # subclass of dict. defaultdict(facroty)
# from collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce # reduce(f, iter[, init])
# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate # accumulate(iter[, f])
# from operator import itemgetter # itemgetter(1), itemgetter('key')
# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)
def main():
mod = 1000000007 # 10^9+7
inf = float("inf") # sys.float_info.max = 1.79...e+308
# inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19
sys.setrecursionlimit(10**6) # 1000 -> 1000000
def input():
return sys.stdin.readline().rstrip()
def ii():
return int(input())
def mi():
return map(int, input().split())
def mi_0():
return map(lambda x: int(x) - 1, input().split())
def lmi():
return list(map(int, input().split()))
def lmi_0():
return list(map(lambda x: int(x) - 1, input().split()))
def li():
return list(input())
s = input()
print("2018" + s[4:])
if __name__ == "__main__":
main()
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s625703114 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | import copy
n, hp = map(int, input().split(" "))
la = [0 for i in range(n)]
lb = [0 for i in range(n)]
for i in range(n):
la[i], lb[i] = map(int, input().split(" "))
cnt = 0
ma = max(la)
lma = [i for i, x in enumerate(la) if x == ma]
mib = 10**9
for i in lma:
if lb[i] < mib:
mib = lb[i]
k = i
tmp = copy.deepcopy(lb)
while max(tmp) > ma:
hp -= max(tmp)
tmp.remove(max(tmp))
cnt += 1
if hp < 0:
print(cnt)
exit(0)
if lb[k] > ma:
hp += lb[k]
if lb[k] > ma:
hp -= lb[k]
cnt += 1
if hp % ma == 0:
print(cnt + int(hp / ma))
else:
print(cnt + int(hp / ma) + 1)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s832188766 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | import sys
N, Y = map(int, input().split())
for x in range(N+1):
for y in range(N+1-x):
for z in range(N+1-x-y):
if Y == 10000*x+5000*y+1000*z :
print(x,y,z)
sys.exit()
print("-1 -1 -1") | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s840398892 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n, Y = map(int, input().split())
x, y, z, e = "-1", "-1", "-1", 0
def check(num, total):
for i in range(num + 1):
for j in range(num + 1):
for k in range(num + 1):
if (i + j + k == num) and (10000 * i + 5000 * j + 1000 * k == total):
x, y, z = str(i), str(j), str(k)
return x + " " + y + " " + z
print(check(n, Y))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s665117367 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print("/".join(["2018"] + input().split("/")[1:]))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s618952001 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | li = list(input())
li[3] = "8"
print(*li, sep="")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s930403753 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | S, T, U = input().split("/")
print("2018/" + T + "/" + U)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s832355398 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s=list(input())
s[3]=8
for in in s:
print(s,end="")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s835077935 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n, *d = map(int, open(0).read().split())
print(len(set(d)))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s379334678 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | dst = "2018" + input()[4:]
print(dst)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s473592858 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print("2018/01/{}".format(input()[8:]))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s457642384 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print("input().replace("2017", "2018")") | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s494923422 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace("2018", "2017"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s764128989 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | d = input()
print(f"{d[:3]}8{d[4:]}")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s377907480 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace(s[3], "8"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s227953327 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input()[:3] + "8" + input()[5:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s111380492 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | a = list(input())
a[3] = "8"
print(a[0] + a[1] + a[2] + a[3] + a[4] + a[5] + a[6] + a[7] + a[8] + a[9])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s554757595 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | hajime = list(input())
hajime[3] = "8"
owari = "".join(hajime)
print(owari)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s340651283 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | y, m, d = map(str, input().split("/"))
print("2018/" + m + "/" + d)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s144525723 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | ans = str(input())
print(ans.replace("2017", "2018"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s162891510 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a = input().split()
print("2018/" + a[1] + "/" + a[2])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s389246399 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s= input()
print(s.replace('2017','2018') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s436467194 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2018" + input())
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s055558752 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a, sums = list(map(int, input().split()))
print(a)
yuki = sums // 10000
taishi = (sums % 10000) // 5000
noguchi = (sums % 5000) // 1000
while a < yuki + taishi + noguchi:
if a - (yuki + taishi + noguchi) % 4 == 0:
taishi -= 1
noguchi += 5
else:
yuki -= 1
taishi += 2
print(yuki, taishi, noguchi)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s548217566 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a, b = map(int, input().split())
for s in range(b // 10000 + 1):
try:
for t in range(b // 5000 + 1):
r = b - s - t
if 10000 * s + 5000 * t + 1000 * r == b and s + t + r == a:
print(s, t, r)
exit()
except ZeroDivisionError:
continue
print(-1, -1, -1)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s035640800 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n, h = (int(i) for i in input().split())
x = [[int(i) for i in input().split()] for i in range(n)]
a, b = 0, []
for j in x:
if a < j[0]:
a = j[0]
b.append(j[1])
num = 0
for j2 in b:
if j2 >= a:
h -= j2
num += 1
if h % a == 0:
answer = (h - h % a) // a + num
else:
answer = (h - h % a) // a + num + 1
print(answer)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s637348142 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | line = input().split()
sheet = int(line[0])
total = int(line[1])
total_store = total
out = [0, 0, 0]
sheet_count = 0
for i in range(sheet):
switch_10000 = 0
switch_5000 = 0
if int(total / 10000) > 0 and sheet_count < sheet:
total -= 10000
sheet_count += 1
out[0] += 1
switch_10000 += 1
if int(total / 5000) > 0 and sheet_count < sheet and switch_10000 == 0:
total -= 5000
sheet_count += 1
out[1] += 1
switch_5000 += 1
if (
int(total / 1000) > 0
and sheet_count < sheet
and switch_10000 == 0
and switch_5000 == 0
):
total -= 1000
sheet_count += 1
out[2] += 1
if out[0] * 10000 + out[1] * 5000 + out[2] * 1000 == total_store:
if sum(out) == sheet:
print(out[0], out[1], out[2])
else:
out[0] = 0
out[1] = 0
out[2] = int(total_store / 1000)
cnt = 0
while sum(out) != sheet_count and out[2] >= 0:
out[2] -= 5
out[1] += 1
cnt += 1
if sum(out) == sheet and out[2] >= 0:
print(out[0], out[1], out[2])
if cnt % 2 == 0:
out[1] -= 2
out[0] += 1
if sum(out) == sheet and out[2] >= 0:
print(out[0], out[1], out[2])
else:
print(-1, -1, -1)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s306489639 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | sam = input()
sim = sam.replace("7", "8", 1)
print(sim)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s971741473 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | s1, s2, s3 = input().split("/")
print("2017/01/" + s3)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s569045331 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | str = input()[4:10]
print("2018" + str)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s198755801 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a, b input().split()
a[3] = 8
print(a+b) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s568505523 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | num = input()
num[3] = "8"
print(num)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s336398206 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | l = list(input())
print('2018'+l.[4:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s881108485 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace('2017', '2018') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s125428227 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("input().replace(2017, 2018)")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s653898342 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input()[0:3] + "8" + input()[5:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s232109192 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
print(S.replace("2017","2018") | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s835697161 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s = input()
print(s.replace("2017,"2018")) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s234299183 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s = input()
print("2017/01/"+s[-2:] | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s157457393 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s = input()
print(s.replace('2017','2018') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s548635019 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
print(S.replace("2017","2018") | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s045583128 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | ds = str(input())
ds = ds.replace("2017", "2018")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s302427203 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print("2018" + input()[4::])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s972035570 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2018/01" + input()[-2:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s888465649 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2018/01/" + input()[9:])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s396095289 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print("2018"+input([4:])) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s996705374 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | # -*- coding: utf-8 -*-
S = str(input())
a = S[0]
b = S[1]
c = S[2]
d = S[3]
f = S[5]
g = S[6]
i = S[8]
j = S[9]
D = int(d) + 1
print(str(a) + str(b) + str(c) + str(D) + "/" + str(f) + str(g) + "/" + str(i) + str(j))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s299676835 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | year, month, date = input().split("/")
year = 2018
print(str(year) + "/" + month + "/" + date)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s729669774 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
L = S.split("/")
L[0] = "2018"
print(L[0]+"/"L[1]+"/"L[2]) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s611850225 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n, Y = map(int, input().split())
Y = int(Y / 1000)
ans = [-1, -1, -1]
for x in range(n):
for y in range(n):
if 10 * x + 5 * y + (n - x - y) == Y and n - x - y >= 0:
ans = [x, y, n - x - y]
print(*ans)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s204850353 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a = int(input().split("/"))
a[0] = 2018
print(str(a[0]) + "/" + str(a[1]) + "/" + str(a[2]))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s282452072 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | t = int(input())
s = set()
for i in range(t):
s.add(int(input()))
print(len(s))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s512244560 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | N,Y = map(int, input().split())
for i in range(N+1):
for j in range(N+1-i):
k = N-i-j
if Y == 10000*i + 5000*j + 1000*k:
print(i j k)
sys.exit()
print(-1 -1 -1) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s914131482 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | day = list(input().split('/'))
day[0] = '2018'
print(day[0],day[1],day[2],sep(/)) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s046119393 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | N, Y = map(int, input().split())
for i in (N+1):
for j in (N+1-i):
if Y == 10000*i + 5000*j + 1000*k
print(i, j, N-i-j)
else:
print(-1, -1, -1)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s052581735 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n,Y = map(int,input().split())
Y = int(Y / 1000)
ans = [-1,-1,-1]
for x in range(n):
for y in range(n):
if 10*x + 5*y + (n-x-y) == Y and n-x-y => 0:
ans = [x,y,n-x-y]
print(*ans) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s569895558 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | N, Y = map(int, input().split())
for i in (N+1):
for j in (N+1-i):
k = N-i-j
if Y == 10000*i + 5000*j + 1000*k
print(i, j, k)
else:
print(-1, -1, -1)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s836915110 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | day = list(map(int, input().split("/")))
day[0] = 2018
print(day[0], day[1], day[2], sep=("/"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s854377268 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | date = input().split("/")
date[0] == "2018"
print(date[0] + "/" + date[1] + "/" + date[2])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s001619965 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s=str(input())
print(s.reprace("2017"."2018")) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s464289915 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
L = S.split(/)
L[0] = "2018"
print(L[0]+L[1]+L[2]) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s768221598 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(len(set[(int(input()) for i in range(int(input()))]))) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s767357814 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | date=input()
#if date[0:4]=="2017":
date="2018"+[4:]
print(date) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s152226682 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a,b,c=map(int,input().split("/"))
print(str(a+1)"/"str(b)"/"str(c)) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s245893313 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | #85A already2018
s=input()
s=s[:2]+"7"s[4:]
print(s) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s721540691 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | S = input(">> ")
S = str(S)
reS = S.replace("2017", "2018")
print(reS)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s879519976 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(len(set[int(input()), for _ in range(int(input()))])) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s047627858 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | y,m,d=input().split('/')
y=int(y)
y+=1
y=str(y)\
print(y+'/'+m+'/'+d) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s118441711 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(len(set(int(input()) for i in range(int(input())))))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s652936217 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S = input()
print(S.replace('2017/01/', '2018/01/') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s171041723 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | s = input()
y, m, d = s.split("/")
print("2018/" + m + "/" d) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s170469638 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | a,b,c = input().split(/)
a = '2018'
print(a + '/' + b + '/' + c) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s169334807 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | import math
def find_argmax(num_list):
argmax = sorted(enumerate(num_list), key=lambda x: x[1])[-1][0]
return argmax
def find_all_more_than(threshold, num_list):
indices = [idx for idx, num in enumerate(num_list) if num > threshold]
return indices
def read_input():
initial_inputs = input().split(" ")
N = int(initial_inputs[0])
H = int(initial_inputs[1])
a_list = []
b_list = []
for _ in range(N):
inputs = input().split(" ")
a = int(inputs[0])
b = int(inputs[1])
a_list.append(a)
b_list.append(b)
return N, H, a_list, b_list
# TLE
def searchA(N, H, a_list, b_list):
# initialize used_indices
used_indices = [False for b in b_list]
# initialize search_area
search_area = [b for b in b_list]
# count how many times
times_count = 0
while H > 0:
# search
idx = find_argmax(search_area)
# check
if used_indices[idx]:
# calculate rest and finish
rest_count = math.ceil(H / search_area[idx])
return times_count + rest_count
# attack
H -= search_area[idx]
# change
search_area[idx] = a_list[idx]
used_indices[idx] = True
# count
times_count += 1
return times_count
def searchB(N, H, a_list, b_list):
# initialize used_indices
used_indices = [False] * N
# initialize search_area
search_area = [b for b in b_list]
# count how many times
times_count = 0
# pick up b indices higher than max(a_list)
higher_b_indices = find_all_more_than(max(a_list), b_list)
for idx in higher_b_indices:
if not H > 0:
return times_count
used_indices[idx] = True
# attack
H -= search_area[idx]
times_count += 1
# change
search_area[idx] = a_list[idx]
used_indices[idx] = True
while H > 0:
# search
idx = find_argmax(search_area)
# check
if used_indices[idx]:
# calculate rest and finish
rest_count = math.ceil(H / search_area[idx])
return times_count + rest_count
# attack
H -= search_area[idx]
times_count += 1
# change
search_area[idx] = a_list[idx]
used_indices[idx] = True
return times_count
def main():
# read input
N, H, a_list, b_list = read_input()
# search
times_count = searchB(N, H, a_list, b_list)
# output
print(times_count)
if __name__ == "__main__":
main()
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s900963329 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | import sys
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 li2(N):
return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j):
return [[ini] * i for i2 in range(j)]
def dp3(ini, i, j, k):
return [[[ini] * i for i2 in range(j)] for i3 in range(k)]
import bisect
N, H = mi()
A = [0] * N
B = [0] * N
for i in range(N):
A[i], B[i] = mi()
B = sorted(B)
a = max(A)
m = bisect.bisect_left(B, a)
"""
s = 1
e = N
m = (s+e)//2
pre_m = 0
while True:
m = (s+e)//2
if B[m-1] > a:
e = m
elif B[m-1] <= a:
s = m
if s==e:
m -= 1
break
#else:
#break
if e-s==1 and pre_m==m:
break
pre_m = m
"""
rem = H - sum(B[m:])
if rem >= 0:
print((N - m) + rem // a + (rem % a == 0))
else:
for i in range(m, N):
rem += B[i]
if rem >= 0:
print(N - i)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s213864605 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | 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))))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s316368345 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | from numba import jit
N, Y = map(int, input().split())
count_max = Y / 1000 # all 1000
@jit
def sample(n, y):
ans = "-1 -1 -1"
for i in reversed(range(y // 10000 + 1)):
count_tmp1 = count_max - 9 * i
price_tmp1 = y - 10000 * i
if count_tmp1 < n or price_tmp1 < 0:
continue
if count_tmp1 == n:
ans = "{} {} {}".format(i, 0, N - i)
return ans
if price_tmp1 > 5000 * count_tmp1:
return ans
for j in reversed(range(price_tmp1 // 5000 + 1)):
count_tmp2 = count_tmp1 - 4 * j
price_tmp2 = price_tmp1 - 5000 * j
if count_tmp2 < n or price_tmp2 < 0:
continue
if count_tmp2 == n:
ans = "{} {} {}".format(i, j, N - i - j)
return ans
if price_tmp2 > 5000 * count_tmp2:
return ans
return ans
a = sample(N, Y)
print(a)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s569983079 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | l = list(input())
print('2018',[4:]) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s663878058 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace("2017", "2018)) | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s553105201 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | print("2018", input()[4:], sep="")
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s256300376 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace("8", "7"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s291149592 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print(input().replace("7", "8"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s911193791 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | print("2017" + input()[4::])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s774550171 | Wrong Answer | p03469 | Input is given from Standard Input in the following format:
S | M = input()
print(M[3:] + "8" + M[:6])
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s307176393 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | S=input()
print(S.replace([3],'8') | 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s822810800 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | a, b, c = input().split("/")
n = int(a)
n += 1
print("{}/{}/{}".format(n, b, c))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s807728377 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | ymd = ""
s = str(input())
for i in s.split("/"):
if i == "2017":
i = "2018"
ymd = ymd + i + "/"
ymd = ymd[:-1]
print(ymd)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s356774234 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | input_line = list(input())
input_line[3] = "8"
print("".join(input_line))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s350073860 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | import math
import sys
def getinputdata():
# 配列初期化
array_result = []
data = input()
array_result.append(data.split(" "))
flg = 1
try:
while flg:
data = input()
array_temp = []
if data != "":
array_result.append(data.split(" "))
flg = 1
else:
flg = 0
finally:
return array_result
arr_data = getinputdata()
s = arr_data[0][0]
print(s.replace("2017", "2018"))
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s089213919 | Accepted | p03469 | Input is given from Standard Input in the following format:
S | str2017 = input()
str2017 = str2017.replace("2017", "2018")
print(str2017)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Replace the first four characters in S with `2018` and print it.
* * * | s056605512 | Runtime Error | p03469 | Input is given from Standard Input in the following format:
S | n, y = map(int, input().split())
YH = -1
IH = -1
HN = -1
for a in range(n):
for b in range(n - a):
c = n - a - b
total = 10000 * a + 5000 * b + 1000 * c
if total == y:
YH = a
IH = b
HN = c
print(YH, IH, HN)
| 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. | [{"input": "2017/01/07", "output": "2018/01/07\n \n\n* * *"}, {"input": "2017/01/31", "output": "2018/01/31"}] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.