結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,004 KB
testcase_01 AC 77 ms
71,280 KB
testcase_02 AC 78 ms
71,280 KB
testcase_03 AC 77 ms
71,080 KB
testcase_04 AC 77 ms
71,008 KB
testcase_05 AC 80 ms
71,012 KB
testcase_06 AC 78 ms
71,280 KB
testcase_07 AC 78 ms
70,940 KB
testcase_08 AC 77 ms
70,992 KB
testcase_09 AC 78 ms
71,128 KB
testcase_10 AC 77 ms
71,184 KB
testcase_11 AC 77 ms
71,084 KB
testcase_12 AC 79 ms
70,996 KB
testcase_13 AC 84 ms
71,044 KB
testcase_14 AC 77 ms
71,192 KB
testcase_15 AC 77 ms
70,988 KB
testcase_16 AC 78 ms
71,296 KB
testcase_17 AC 76 ms
70,796 KB
testcase_18 AC 77 ms
70,964 KB
testcase_19 AC 76 ms
70,992 KB
testcase_20 AC 77 ms
71,084 KB
testcase_21 AC 77 ms
71,008 KB
testcase_22 AC 78 ms
70,988 KB
testcase_23 AC 78 ms
70,988 KB
testcase_24 AC 77 ms
71,180 KB
testcase_25 AC 77 ms
70,996 KB
testcase_26 WA -
testcase_27 AC 78 ms
71,120 KB
testcase_28 AC 78 ms
70,808 KB
testcase_29 AC 78 ms
70,864 KB
testcase_30 AC 76 ms
71,196 KB
testcase_31 AC 79 ms
70,988 KB
testcase_32 AC 79 ms
70,868 KB
testcase_33 AC 77 ms
71,004 KB
testcase_34 WA -
testcase_35 AC 78 ms
70,868 KB
testcase_36 AC 79 ms
70,864 KB
testcase_37 AC 76 ms
70,964 KB
testcase_38 AC 77 ms
71,260 KB
testcase_39 AC 79 ms
70,968 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
    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