結果
問題 | No.2109 Special Week |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:14:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 36 ms / 2,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 387 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 53,932 KB |
最終ジャッジ日時 | 2025-03-20 21:15:38 |
合計ジャッジ時間 | 2,746 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
days_in_month = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] M, D, K = map(int, input().split()) current_m = M current_d = D digits_used = set() for _ in range(7): mm = f"{current_m:02d}" dd = f"{current_d:02d}" digits = mm + dd for c in digits: digits_used.add(c) # Move to the next day if current_d == days_in_month[current_m]: current_m += 1 if current_m > 12: current_m = 1 current_d = 1 else: current_d += 1 if len(digits_used) >= K: print("Yes") else: print("No")