結果

問題 No.2109 Special Week
ユーザー とりゐとりゐ
提出日時 2022-10-28 22:09:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 86,428 KB
実行使用メモリ 71,348 KB
最終ジャッジ日時 2023-09-20 05:08:46
合計ジャッジ時間 5,235 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,036 KB
testcase_01 AC 76 ms
70,964 KB
testcase_02 AC 77 ms
71,124 KB
testcase_03 AC 78 ms
71,140 KB
testcase_04 AC 79 ms
71,052 KB
testcase_05 AC 77 ms
71,092 KB
testcase_06 AC 77 ms
71,144 KB
testcase_07 AC 76 ms
71,088 KB
testcase_08 AC 76 ms
71,144 KB
testcase_09 AC 75 ms
70,884 KB
testcase_10 AC 78 ms
71,092 KB
testcase_11 AC 76 ms
71,036 KB
testcase_12 AC 77 ms
71,348 KB
testcase_13 AC 76 ms
71,332 KB
testcase_14 AC 77 ms
71,092 KB
testcase_15 AC 74 ms
71,080 KB
testcase_16 AC 77 ms
71,004 KB
testcase_17 AC 76 ms
70,972 KB
testcase_18 AC 73 ms
71,032 KB
testcase_19 AC 75 ms
71,160 KB
testcase_20 AC 74 ms
71,196 KB
testcase_21 AC 76 ms
71,164 KB
testcase_22 AC 74 ms
70,964 KB
testcase_23 AC 76 ms
70,932 KB
testcase_24 AC 76 ms
71,052 KB
testcase_25 AC 75 ms
71,200 KB
testcase_26 AC 75 ms
71,292 KB
testcase_27 AC 75 ms
71,196 KB
testcase_28 AC 77 ms
71,000 KB
testcase_29 AC 77 ms
71,196 KB
testcase_30 AC 75 ms
70,932 KB
testcase_31 AC 77 ms
71,184 KB
testcase_32 AC 78 ms
71,160 KB
testcase_33 AC 77 ms
71,144 KB
testcase_34 AC 78 ms
71,088 KB
testcase_35 AC 76 ms
71,032 KB
testcase_36 AC 75 ms
71,044 KB
testcase_37 AC 76 ms
70,968 KB
testcase_38 AC 76 ms
70,848 KB
testcase_39 AC 77 ms
71,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def next_day(m,d):
  lim=[0,31,28,31,30,31,30,31,31,30,31,30,31]
  if lim[m]==d:
    m+=1
    d=1
    if m==13:
      m=1
    return m,d
  else:
    return m,d+1

m,d,k=map(int,input().split())
ans=set()
for _ in range(7):
  for j in str(m)+str(d):
    ans.add(j)
  if len(str(m)+str(d))!=4:
    ans.add('0')
  m,d=next_day(m,d)

if len(ans)>=k:
  print('Yes')
else:
  print('No')
0