Submission #9683675


Source Code Expand

Copy
# C - 100 to 105
from collections import defaultdict


def main():
    X = int(input())
    items = tuple(range(100, 106))
    dp = defaultdict(bool)
    dp[0] = True
    while max(dp.keys()) < X:
        for possible_price in tuple(dp.keys()):
            for item in items:
                dp[possible_price + item] = True
    print(int(X in dp))


if __name__ == "__main__":
    main()

Submission Info

Submission Time
Task C - 100 to 105
User solzard
Language Python3 (3.4.3)
Score 0
Code Size 407 Byte
Status
Exec Time 2104 ms
Memory 6476 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt
All 0 / 300 in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in19.txt, in20.txt, in21.txt, in22.txt, in23.txt, in27.txt, in28.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
in01.txt 20 ms 3316 KB
in02.txt 20 ms 3316 KB
in03.txt 20 ms 3316 KB
in04.txt 20 ms 3316 KB
in05.txt 20 ms 3316 KB
in06.txt 20 ms 3316 KB
in07.txt 20 ms 3316 KB
in08.txt 20 ms 3316 KB
in09.txt 20 ms 3316 KB
in10.txt 20 ms 3316 KB
in11.txt 20 ms 3316 KB
in12.txt 20 ms 3316 KB
in13.txt 20 ms 3316 KB
in19.txt 23 ms 3444 KB
in20.txt 24 ms 3444 KB
in21.txt 24 ms 3444 KB
in22.txt 26 ms 3444 KB
in23.txt 24 ms 3444 KB
in27.txt 2104 ms 6476 KB
in28.txt 2104 ms 6476 KB
sample_01.txt 20 ms 3316 KB
sample_02.txt 20 ms 3316 KB