結果

問題 No.587 七対子
ユーザー nobigomu
提出日時 2018-05-14 12:32:25
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 19:53:00
合計ジャッジ時間 945 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

print((function (f, s)
	local h,t={},0
	for i=1,13 do
		local c=f(s,i,i)
		if h[c]==nil then h[c],t=0,t+1 end h[c]=h[c]+1
		if h[c]>2 or t>7 then return "Impossible" end
	end
	for k,v in pairs(h) do if v==1 then return k end end
end)(string.sub, io.stdin:read("*l")))
0