結果

問題 No.536 人工知能
ユーザー Lo_OTLo_OT
提出日時 2017-12-31 14:21:38
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 1,000 ms
コード長 190 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 15,276 KB
最終ジャッジ日時 2023-08-23 12:26:43
合計ジャッジ時間 1,711 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,196 KB
testcase_01 AC 84 ms
15,000 KB
testcase_02 AC 79 ms
15,240 KB
testcase_03 AC 80 ms
15,092 KB
testcase_04 AC 80 ms
15,192 KB
testcase_05 AC 81 ms
15,132 KB
testcase_06 AC 82 ms
15,272 KB
testcase_07 AC 79 ms
15,272 KB
testcase_08 AC 79 ms
15,276 KB
testcase_09 AC 79 ms
15,136 KB
testcase_10 AC 79 ms
15,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

name = gets.chomp
aiIndex = name.length

if name[aiIndex - 2] == "a" && name[aiIndex - 1] == "i"
    name[aiIndex - 2] = "A"
    name[aiIndex - 1] = "I"
else
    name += "-AI"
end

puts name
0