結果

問題 No.18 うーさー暗号
ユーザー Ruizi_LuigiRuizi_Luigi
提出日時 2015-10-19 00:58:24
言語 PHP
(8.3.4)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 1,805 ms
コンパイル使用メモリ 18,552 KB
実行使用メモリ 18,872 KB
最終ジャッジ日時 2023-09-29 00:28:10
合計ジャッジ時間 2,962 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,764 KB
testcase_01 AC 15 ms
18,564 KB
testcase_02 AC 15 ms
18,724 KB
testcase_03 AC 17 ms
18,744 KB
testcase_04 AC 16 ms
18,828 KB
testcase_05 AC 16 ms
18,828 KB
testcase_06 AC 16 ms
18,828 KB
testcase_07 AC 17 ms
18,824 KB
testcase_08 AC 16 ms
18,704 KB
testcase_09 AC 17 ms
18,696 KB
testcase_10 AC 15 ms
18,692 KB
testcase_11 AC 16 ms
18,872 KB
testcase_12 AC 17 ms
18,596 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = (string)trim(fgets(STDIN));
$line = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for ($i = 1; $i <= strlen($s); $i++) {
    $idx = strpos($line, $s[$i-1]);
    $i_tmp = $i;

    while($i_tmp > 25) {
        $i_tmp -= 26;
    }
    echo $line[$idx-$i_tmp];
}
echo PHP_EOL;
?>
0