結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2018-05-14 14:12:14 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 57 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 11:42:56 |
合計ジャッジ時間 | 788 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
local ffi = require 'ffi'local C, ct = ffi.C, ffi.typeof 'uint8_t[1]'ffi.cdef 'int scanf(const char *, ...);'print((function (c)local a,i,t,r={226,128,166},1,0,0while C.scanf("%c",c)==1 doif c[0]==a[i] thenif i==3 then i,t=1,t+1 else i=i+1 endelsei,t,r=1,0,t>r and t or rendendreturn rend)(ct()))