結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-29 01:13:16 |
| 言語 | Lua (LuaJit 2.1.1774638290) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 357 bytes |
| 記録 | |
| コンパイル時間 | 113 ms |
| コンパイル使用メモリ | 7,972 KB |
| 実行使用メモリ | 16,072 KB |
| 最終ジャッジ日時 | 2026-04-02 18:12:14 |
| 合計ジャッジ時間 | 6,359 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
s = io.read()
t = {}
for i = 1, 13 do
a = string.sub(s, i, i)
if(t[a] == nil) then t[a] = 1 else t[a] = t[a] + 1 end
end
tgt = nil
imp = false
for k, v in pairs(t) do
if(v == 1) then
if(tgt == nil) then tgt = k else imp = true end
elseif(2 < v) then
imp = true
end
end
if(imp) then print("Impossible") else print(tgt) end