結果

問題 No.536 人工知能
ユーザー tmsbtmsb
提出日時 2018-11-01 00:26:31
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 234 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-04-30 02:25:22
合計ジャッジ時間 2,230 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 88 ms
12,288 KB
testcase_02 AC 88 ms
12,160 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 88 ms
12,032 KB
testcase_06 WA -
testcase_07 AC 87 ms
12,160 KB
testcase_08 WA -
testcase_09 AC 88 ms
12,032 KB
testcase_10 AC 85 ms
12,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def artificial_inteligence()
  str = gets;
  temp = []
  n = str.size
  temp << str[n - 2]
  temp << str[n - 1]
  if temp == 'ai'
    puts "#{str[0..n-2]}#{temp}"
  else
    puts "#{str[0..n-2]}-AI"
  end
end

artificial_inteligence()
0