It is easy to copy and paste the test case input to INPUT by writing as follows. You can also measure the execution time.
test.py
import io
import sys
import time
_INPUT = """\
#Copy and paste the input here
"""
StartTime = time.time()
sys.stdin = io.StringIO(_INPUT)
# --------------------------------------------------------
#Describe the process here
# --------------------------------------------------------
print ("[Sec]"+str(time.time() - StartTime))
Example:
example_ABC177_A.py
import io
import sys
import time
_INPUT = """\
1000 15 80
"""
StartTime = time.time()
sys.stdin = io.StringIO(_INPUT)
# --------------------------------------------------------
d,t,s=map(int, input().split())
if d<=s*t:print("Yes")
else:print("No")
# --------------------------------------------------------
print ("[Sec]"+str(time.time() - StartTime))
output
example_ABC177_A.py
Yes
[Sec]0.0009970664978027344
Submit only within the dotted line.
Recommended Posts