結果

問題 No.2109 Special Week
コンテスト
ユーザー obakyan
提出日時 2022-10-29 00:46:48
言語 Lua
(LuaJit 2.1.1767980792)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 392 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 306 ms
コンパイル使用メモリ 6,272 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2026-03-27 14:18:55
合計ジャッジ時間 1,756 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

m, d, k = io.read("*n", "*n", "*n")
t = {31,28,31,30,31,30,31,31,30,31,30,31}
c = 0
z = ""
for i = 1, 7 do
  z = z .. string.format("%02d", m) .. string.format("%02d", d)
  -- print(z)
  if t[m] == d then
    d = 1
    m = m + 1
    if m == 13 then m = 1 end
  else
    d = d + 1
  end
end
y = 0
for j = 0, 9 do
  if z:find(tostring(j)) then y = y + 1 end
end
print(k <= y and "Yes" or "No")
0