結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-18 23:28:19 |
| 言語 | JavaScript (node v25.8.2) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 5,000 ms |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 7,972 KB |
| 実行使用メモリ | 108,884 KB |
| 最終ジャッジ日時 | 2026-04-02 13:00:30 |
| 合計ジャッジ時間 | 6,217 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
function Main(input) {
input = input.split("\n");
const s = input[0];
const al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
let res = "";
for (let i = 0; i < s.length; ++i) {
let idx = al.indexOf(s[i]);
idx -= i + 1;
idx %= 26;
if (idx < 0) idx += 26;
res += al[idx];
}
console.log(res);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));