Submission #42123508
Source Code Expand
# import math, heapq, bisect, itertools, functools
# from collections import deque, Counter, defaultdict, OrderedDict
# python sample.py < input
if __name__ == '__main__':
n = int(input())
ans1 = n // 5 * 5
ans2 = n // 5 * 5 + 5
ans = None
d = 101
if 0 <= ans1 <= 100 and n - ans1 < d:
ans = ans1
d = n - ans1
if 0 <= ans2 <= 100 and ans2 - n < d:
ans = ans2
d = n - ans2
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Water Station |
| User | shinever |
| Language | PyPy3 (7.3.0) |
| Score | 100 |
| Code Size | 465 Byte |
| Status | AC |
| Exec Time | 62 ms |
| Memory | 61588 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 62 ms | 61480 KiB |
| 00_sample_01.txt | AC | 49 ms | 61568 KiB |
| 00_sample_02.txt | AC | 50 ms | 61436 KiB |
| 01_random_03.txt | AC | 43 ms | 61568 KiB |
| 01_random_04.txt | AC | 49 ms | 61572 KiB |
| 01_random_05.txt | AC | 51 ms | 61588 KiB |
| 01_random_06.txt | AC | 50 ms | 61324 KiB |
| 01_random_07.txt | AC | 49 ms | 61508 KiB |
| 01_random_08.txt | AC | 49 ms | 61568 KiB |
| 01_random_09.txt | AC | 51 ms | 61552 KiB |