結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
30,904 KB
testcase_01 AC 41 ms
31,312 KB
testcase_02 AC 41 ms
31,100 KB
testcase_03 AC 40 ms
30,888 KB
testcase_04 AC 42 ms
31,016 KB
testcase_05 AC 41 ms
31,056 KB
testcase_06 AC 41 ms
30,644 KB
testcase_07 AC 41 ms
30,936 KB
testcase_08 AC 41 ms
30,948 KB
testcase_09 AC 41 ms
30,596 KB
testcase_10 AC 45 ms
31,292 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

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

$answer = ($end =='ai') ? substr_replace($input, 'AI', -2) : $input.'-AI';
echo $answer;
0