結果

問題 No.739 大事なことなので2度言います
ユーザー dyechidyechi
提出日時 2019-03-28 15:22:15
言語 PHP
(8.3.4)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 3,047 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 30,888 KB
最終ジャッジ日時 2024-04-21 00:34:37
合計ジャッジ時間 1,232 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
30,616 KB
testcase_01 AC 37 ms
30,708 KB
testcase_02 AC 37 ms
30,680 KB
testcase_03 AC 40 ms
30,888 KB
testcase_04 AC 39 ms
30,876 KB
testcase_05 AC 37 ms
30,836 KB
testcase_06 AC 38 ms
30,684 KB
testcase_07 AC 39 ms
30,532 KB
testcase_08 AC 38 ms
30,680 KB
testcase_09 AC 38 ms
30,748 KB
testcase_10 AC 38 ms
30,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));

if (strlen($s) % 2 == 0) {
    $previous_word = substr($s, 0, strlen($s)/2);
    $after_word = substr($s, strlen($s)/2);
    
    if ($previous_word === $after_word) {
           echo "YES".PHP_EOL;
    } else {
        echo "NO".PHP_EOL;
    }
} else {
    echo "NO".PHP_EOL;
}
?>
0