結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー nobigomunobigomu
提出日時 2018-08-04 17:20:02
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 468 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 5,272 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 21:54:04
合計ジャッジ時間 944 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 1 ms
4,348 KB
testcase_20 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

print((function (g, isLY, D)
	local y,m,d=g(function (a) a[3]=a[3]+2 return a end)
	if isLY(y) then D[2]=29 end
	if D[m]<d then m,d = m+1,d-D[m] end
	if m==13 then y,m=y+1,1 end
	return string.format("%d/%.02d/%.02d",y,m,d)
end)(function (f)
	local a={}
	for e in io.stdin:read("*l"):gmatch("%d+") do table.insert(a,tonumber(e)) end
	return unpack(f(a))
end, function (n)
	if n%100==0 then return n%400==0 end return n%4==0
end, {31;28;31;30;31;30;31;31;30;31;30;31}))
0