結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,024 KB
testcase_01 AC 75 ms
71,100 KB
testcase_02 AC 72 ms
71,320 KB
testcase_03 AC 75 ms
71,116 KB
testcase_04 AC 75 ms
70,988 KB
testcase_05 AC 76 ms
70,988 KB
testcase_06 AC 73 ms
71,132 KB
testcase_07 AC 72 ms
71,104 KB
testcase_08 AC 73 ms
71,160 KB
testcase_09 AC 75 ms
71,280 KB
testcase_10 AC 73 ms
71,308 KB
testcase_11 AC 73 ms
71,012 KB
testcase_12 AC 72 ms
71,008 KB
testcase_13 AC 72 ms
71,020 KB
testcase_14 AC 74 ms
70,944 KB
testcase_15 AC 74 ms
71,056 KB
testcase_16 AC 73 ms
71,120 KB
testcase_17 AC 72 ms
71,308 KB
testcase_18 AC 73 ms
70,880 KB
testcase_19 AC 72 ms
71,064 KB
testcase_20 AC 72 ms
71,068 KB
testcase_21 AC 72 ms
71,224 KB
testcase_22 AC 70 ms
71,064 KB
testcase_23 AC 73 ms
71,184 KB
testcase_24 AC 73 ms
71,308 KB
testcase_25 AC 73 ms
71,144 KB
testcase_26 WA -
testcase_27 AC 72 ms
70,996 KB
testcase_28 AC 71 ms
71,136 KB
testcase_29 AC 73 ms
71,208 KB
testcase_30 AC 72 ms
71,156 KB
testcase_31 AC 72 ms
71,100 KB
testcase_32 AC 75 ms
71,160 KB
testcase_33 AC 75 ms
70,872 KB
testcase_34 WA -
testcase_35 AC 74 ms
71,068 KB
testcase_36 AC 74 ms
71,228 KB
testcase_37 AC 75 ms
71,224 KB
testcase_38 AC 75 ms
71,060 KB
testcase_39 AC 75 ms
71,132 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
    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