結果
| 問題 | No.2109 Special Week |
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2024-07-17 09:05:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 407 bytes |
| 記録 | |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-17 09:05:26 |
| 合計ジャッジ時間 | 2,967 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 |
ソースコード
M,D,K=map(int,input().split())
def next_day(M,D):
if (M,D)==(12,31):
return 1,1
D+=1
if (31,28,31,30,31,30,31,31,30,31,30,31)[M-1]<D:
M+=1
D=1
return M,D
number=[]
for _ in range(7):
number.append(M)
number.append(D)
M,D=next_day(M,D)
use=[0]*10
for n in number:
use[n//10]=1
use[n%10]=1
if sum(use)>=K:
ans="Yes"
else:
ans="No"
print(ans)
vwxyz