結果

問題 No.18 うーさー暗号
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-13 15:07:05
言語 PHP
(8.3.4)
結果
AC  
実行時間 7 ms / 5,000 ms
コード長 160 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 12,132 KB
実行使用メモリ 12,280 KB
最終ジャッジ日時 2023-09-21 12:46:46
合計ジャッジ時間 1,086 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
12,176 KB
testcase_01 AC 6 ms
12,268 KB
testcase_02 AC 6 ms
12,272 KB
testcase_03 AC 6 ms
12,224 KB
testcase_04 AC 5 ms
12,252 KB
testcase_05 AC 6 ms
12,280 KB
testcase_06 AC 6 ms
12,184 KB
testcase_07 AC 6 ms
12,176 KB
testcase_08 AC 6 ms
12,232 KB
testcase_09 AC 7 ms
12,172 KB
testcase_10 AC 6 ms
12,252 KB
testcase_11 AC 6 ms
12,280 KB
testcase_12 AC 6 ms
12,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$S=trim(fgets(STDIN));
$ans="";
for($i=0;$i<strlen($S);$i++) {
  $c=ord($S[$i]);
  $c-=(($i+1)%26);
  if($c<65) $c+=26;
  $ans.=chr($c);
}
print($ans);
?>
0