結果

問題 No.18 うーさー暗号
ユーザー laneguelanegue
提出日時 2020-04-02 03:54:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 369 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 62,444 KB
実行使用メモリ 22,500 KB
最終ジャッジ日時 2023-09-09 23:19:08
合計ジャッジ時間 2,623 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
20,492 KB
testcase_01 AC 50 ms
22,500 KB
testcase_02 AC 50 ms
20,468 KB
testcase_03 AC 49 ms
20,476 KB
testcase_04 AC 49 ms
20,460 KB
testcase_05 AC 49 ms
20,580 KB
testcase_06 AC 49 ms
20,412 KB
testcase_07 AC 49 ms
18,424 KB
testcase_08 AC 49 ms
20,392 KB
testcase_09 AC 50 ms
22,468 KB
testcase_10 AC 50 ms
20,652 KB
testcase_11 AC 50 ms
22,436 KB
testcase_12 AC 49 ms
18,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
public class Program
{
    static void Main()
    {
        char[] s = Console.ReadLine().ToCharArray();
        for (int i = 0; i < s.Length; i++)
        {
            int c = s[i];
            c -= 'A';
            c += (i / 26 + 1) * 26;
            s[i] = (char)((c - (i + 1)) % 26 + 'A');
        }
        Console.WriteLine(new String(s));
    }
}
0