結果

問題 No.2030 Googol Strings
ユーザー 👑 obakyanobakyan
提出日時 2022-08-09 14:30:12
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 4,968 KB
実行使用メモリ 10,332 KB
最終ジャッジ日時 2023-10-20 00:05:24
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
4,348 KB
testcase_01 AC 3 ms
4,348 KB
testcase_02 AC 3 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 11 ms
4,348 KB
testcase_05 AC 3 ms
4,348 KB
testcase_06 AC 7 ms
8,260 KB
testcase_07 AC 9 ms
10,332 KB
testcase_08 AC 9 ms
10,332 KB
testcase_09 AC 3 ms
4,348 KB
testcase_10 AC 4 ms
4,348 KB
testcase_11 AC 3 ms
4,348 KB
testcase_12 AC 10 ms
4,348 KB
testcase_13 AC 6 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 4 ms
4,348 KB
testcase_16 AC 6 ms
5,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local n = io.read("*n", "*l")
for i = 1, n do
  local x = io.read()
  local y = io.read()
  local xy = x..y
  local yx = y..x
  if xy < yx then
    print "Y"
  elseif yx < xy then
    print "X"
  else
    print(#x < #y and "Y" or "X")
  end
end
0