結果

問題 No.536 人工知能
ユーザー PcclaPccla
提出日時 2017-07-03 23:07:31
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 30,960 KB
実行使用メモリ 31,180 KB
最終ジャッジ日時 2024-04-15 14:49:58
合計ジャッジ時間 1,156 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
30,936 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 43 ms
30,924 KB
testcase_04 AC 42 ms
30,856 KB
testcase_05 WA -
testcase_06 AC 42 ms
30,908 KB
testcase_07 WA -
testcase_08 AC 42 ms
30,828 KB
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
// 標準入力
$k = trim(fgets(STDIN));
//末尾2文字を抜き出す
$v = substr($k, -2);

if ($v == 'ai')
{
$o = substr_replace($k, 'AI', -2);
echo $o;
} else {
$o = substr_replace($k, '-AI', -2);
echo $o;
}
0