結果

問題 No.18 うーさー暗号
ユーザー funakoshifunakoshi
提出日時 2019-06-20 11:33:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 2,183 ms
コンパイル使用メモリ 99,276 KB
実行使用メモリ 23,144 KB
最終ジャッジ日時 2023-08-22 09:22:18
合計ジャッジ時間 4,135 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
19,204 KB
testcase_01 AC 68 ms
19,180 KB
testcase_02 AC 69 ms
21,124 KB
testcase_03 AC 72 ms
23,068 KB
testcase_04 AC 69 ms
21,088 KB
testcase_05 AC 69 ms
23,084 KB
testcase_06 AC 69 ms
21,104 KB
testcase_07 AC 70 ms
23,144 KB
testcase_08 AC 71 ms
23,096 KB
testcase_09 AC 70 ms
21,128 KB
testcase_10 AC 69 ms
23,092 KB
testcase_11 AC 70 ms
19,060 KB
testcase_12 AC 71 ms
19,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
public class Program
{
    static void Main()
    {
        string us = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        string s = Console.ReadLine();
        for (int i = 0; i < s.Length; i++)
        {
            string temp = s.Substring(i, 1);
            int num = us.IndexOf(temp, 0);
            num = num - (i+1);
            while(num<0)
            {
                num = 26 + num;
            }
            temp = us.Substring(num, 1);
            Console.Write(temp);
        }
        Console.Write("\n");
    }
}
0