結果

問題 No.2109 Special Week
ユーザー 👑 Kazun
提出日時 2022-10-28 21:26:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 53,712 KB
最終ジャッジ日時 2024-07-06 00:24:06
合計ジャッジ時間 2,513 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    M,D,K=map(int,input().split())

    X=[0,31,28,31,30,31,30,31,31,30,31,30,31]
    S=set()
    for _ in range(7):
        S|=set(str(M).zfill(2))
        S|=set(str(D).zfill(2))

        if X[M]==D:
            D=1
            M=(M+1)%12+1
        else:
            D+=1
    return len(S)>=K

#==================================================
print("Yes" if solve() else "No")
0