結果

問題 No.70 睡眠の重要性!
ユーザー 826814741_6826814741_6
提出日時 2019-05-12 12:11:22
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 5,016 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-14 18:26:43
合計ジャッジ時間 759 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(function (f)
	local r=0
	for _=1,io.stdin:read("*n") do r=r+f() end
	print(r)
end)((function (ffi)
	ffi.cdef 'int scanf(const char *, ...);'
	local C,ct = ffi.C,ffi.typeof("int8_t[1]")
	local h = { ct();ct();ct();ct() }
	return function ()
		C.scanf("%d:%d%d:%d",h[1],h[2],h[3],h[4])
		local r = h[3][0]*60+h[4][0] - (h[1][0]*60+h[2][0])
		return r<0 and 24*60+r or r
	end
end)(require'ffi'))
0