結果

問題 No.536 人工知能
ユーザー PcclaPccla
提出日時 2017-07-03 23:09:11
言語 PHP
(8.3.4)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 196 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 30,700 KB
実行使用メモリ 31,204 KB
最終ジャッジ日時 2024-04-15 14:50:00
合計ジャッジ時間 1,110 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
30,876 KB
testcase_01 AC 45 ms
30,852 KB
testcase_02 AC 42 ms
30,732 KB
testcase_03 AC 46 ms
31,052 KB
testcase_04 AC 42 ms
30,936 KB
testcase_05 AC 42 ms
30,844 KB
testcase_06 AC 44 ms
30,832 KB
testcase_07 AC 42 ms
30,796 KB
testcase_08 AC 48 ms
30,924 KB
testcase_09 AC 44 ms
31,204 KB
testcase_10 AC 44 ms
30,752 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 = $k.'-AI';
echo $o;
}
0