結果

問題 No.2737 Compound Word
ユーザー 👑 obakyan
提出日時 2024-04-20 10:03:56
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 05:31:06
合計ジャッジ時間 1,079 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

local n = io.read("*n", "*l")
local s = {}
for i = 1, n do
  s[i] = io.read()
end
local c = 0
local t = {}
for i = 1, n do
  for j = 1, n do
    if i ~= j then
      local z = s[i] .. s[j]
      if not t[z] then t[z] = true c = c + 1 end
    end
  end
end
print(c)
0