結果
| 問題 |
No.2109 Special Week
|
| コンテスト | |
| ユーザー |
sepa38
|
| 提出日時 | 2022-10-28 21:24:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 2,000 ms |
| コード長 | 432 bytes |
| コンパイル時間 | 194 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-07-06 00:21:22 |
| 合計ジャッジ時間 | 2,438 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
m, d, k = map(int, input().split())
s = set()
for i in range(7):
m = str(m)
d = str(d)
ms = "0" * (2 - len(m)) + m
ds = "0" * (2 - len(d)) + d
s |= set(map(str, ms+ds))
m = int(m)
d = int(d)
d += 1
if d == 29 and m == 2:
m += 1
d = 1
elif d == 31 and m in [4, 6, 9, 11]:
m += 1
d = 1
elif d == 32 and m in [1, 3, 5, 7, 8, 10, 12]:
m += 1
d = 1
print("Yes" if len(s) >= int(k) else "No")
sepa38