結果

問題 No.2109 Special Week
ユーザー nephrologistnephrologist
提出日時 2022-10-28 22:07:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 548 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 71,344 KB
最終ジャッジ日時 2023-09-20 05:06:36
合計ジャッジ時間 4,899 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,232 KB
testcase_01 AC 75 ms
71,228 KB
testcase_02 AC 75 ms
71,224 KB
testcase_03 AC 76 ms
71,064 KB
testcase_04 AC 78 ms
71,292 KB
testcase_05 AC 75 ms
71,276 KB
testcase_06 AC 75 ms
71,000 KB
testcase_07 AC 76 ms
71,136 KB
testcase_08 AC 77 ms
71,020 KB
testcase_09 AC 77 ms
71,060 KB
testcase_10 AC 75 ms
71,144 KB
testcase_11 AC 76 ms
71,140 KB
testcase_12 AC 78 ms
71,068 KB
testcase_13 AC 77 ms
70,980 KB
testcase_14 AC 76 ms
70,848 KB
testcase_15 AC 77 ms
71,208 KB
testcase_16 AC 77 ms
71,192 KB
testcase_17 AC 76 ms
71,276 KB
testcase_18 AC 77 ms
71,296 KB
testcase_19 AC 75 ms
70,844 KB
testcase_20 AC 76 ms
71,064 KB
testcase_21 AC 76 ms
71,100 KB
testcase_22 AC 75 ms
71,040 KB
testcase_23 AC 76 ms
71,228 KB
testcase_24 AC 76 ms
71,068 KB
testcase_25 AC 77 ms
71,228 KB
testcase_26 AC 77 ms
71,344 KB
testcase_27 AC 77 ms
70,848 KB
testcase_28 AC 77 ms
71,228 KB
testcase_29 AC 76 ms
71,072 KB
testcase_30 AC 76 ms
71,328 KB
testcase_31 AC 77 ms
71,340 KB
testcase_32 AC 77 ms
71,300 KB
testcase_33 AC 77 ms
71,192 KB
testcase_34 AC 76 ms
71,188 KB
testcase_35 AC 76 ms
71,324 KB
testcase_36 AC 75 ms
71,184 KB
testcase_37 AC 76 ms
71,292 KB
testcase_38 AC 76 ms
71,040 KB
testcase_39 AC 78 ms
71,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.buffer.readline

m, d, k = map(int, input().split())

used = [0] * (10)
if m < 10:
    used[0] = 1

if d < 10:
    used[0] = 1

month31 = {1, 3, 5, 7, 8, 10, 12}

for i in range(7):
    dd = d + i
    if m in month31 and dd > 31:
        dd %= 31
    if m == 2 and dd > 28:
        dd %= 28

    if m not in month31 and dd > 30:
        dd %= 30

    if dd < 10:
        used[0] = 1
    for a in str(dd):
        used[int(a)] = 1
    for a in str(m):
        used[int(a)] = 1

print("Yes" if sum(used) >= k else "No")
0