結果

問題 No.2109 Special Week
ユーザー nephrologistnephrologist
提出日時 2022-10-28 22:04:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 71,568 KB
最終ジャッジ日時 2023-09-20 05:03:10
合計ジャッジ時間 5,167 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,068 KB
testcase_01 AC 75 ms
71,156 KB
testcase_02 AC 74 ms
71,392 KB
testcase_03 AC 77 ms
71,044 KB
testcase_04 AC 76 ms
71,076 KB
testcase_05 AC 77 ms
71,396 KB
testcase_06 AC 78 ms
71,336 KB
testcase_07 AC 75 ms
71,224 KB
testcase_08 AC 75 ms
71,292 KB
testcase_09 AC 75 ms
71,132 KB
testcase_10 AC 74 ms
71,160 KB
testcase_11 AC 74 ms
71,032 KB
testcase_12 AC 77 ms
71,044 KB
testcase_13 AC 75 ms
70,928 KB
testcase_14 AC 77 ms
71,256 KB
testcase_15 AC 75 ms
70,928 KB
testcase_16 AC 75 ms
71,160 KB
testcase_17 AC 75 ms
71,396 KB
testcase_18 AC 75 ms
71,152 KB
testcase_19 AC 73 ms
71,132 KB
testcase_20 AC 73 ms
71,184 KB
testcase_21 AC 72 ms
71,268 KB
testcase_22 AC 74 ms
71,020 KB
testcase_23 AC 72 ms
71,048 KB
testcase_24 AC 74 ms
71,128 KB
testcase_25 AC 76 ms
71,088 KB
testcase_26 WA -
testcase_27 AC 74 ms
71,084 KB
testcase_28 AC 73 ms
70,928 KB
testcase_29 AC 73 ms
71,132 KB
testcase_30 AC 72 ms
71,172 KB
testcase_31 AC 76 ms
70,940 KB
testcase_32 AC 75 ms
71,048 KB
testcase_33 AC 75 ms
71,392 KB
testcase_34 WA -
testcase_35 AC 74 ms
71,164 KB
testcase_36 AC 73 ms
71,032 KB
testcase_37 AC 75 ms
71,160 KB
testcase_38 AC 74 ms
71,080 KB
testcase_39 AC 75 ms
71,044 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, 10, 12}

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

    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