結果

問題 No.18 うーさー暗号
ユーザー うわばみうわばみ
提出日時 2020-04-29 13:05:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 476 bytes
コンパイル時間 1,042 ms
コンパイル使用メモリ 63,076 KB
実行使用メモリ 24,776 KB
最終ジャッジ日時 2023-08-18 19:22:50
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
24,776 KB
testcase_01 AC 53 ms
18,672 KB
testcase_02 AC 52 ms
20,660 KB
testcase_03 AC 52 ms
20,632 KB
testcase_04 AC 51 ms
20,580 KB
testcase_05 AC 54 ms
20,524 KB
testcase_06 AC 54 ms
20,776 KB
testcase_07 AC 53 ms
20,656 KB
testcase_08 AC 53 ms
20,648 KB
testcase_09 AC 53 ms
20,660 KB
testcase_10 AC 53 ms
20,660 KB
testcase_11 AC 52 ms
20,712 KB
testcase_12 AC 53 ms
22,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        var s = Console.ReadLine();
        string result = "";
        for(int i = 0; i < s.Length; i++)
        {
            int j = (int)s[i] - i - 1;
            while(j < 'A')
            {
                j += 26;
            }
            while('Z' < j)
            {
                j -= 26;
            }
            result += ((char)j).ToString();
        }
        Console.WriteLine($"{result}");
    }
}
0