結果

問題 No.18 うーさー暗号
ユーザー ganariyaganariya
提出日時 2017-02-19 20:06:35
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 732 bytes
コンパイル時間 1,882 ms
コンパイル使用メモリ 102,292 KB
実行使用メモリ 22,524 KB
最終ジャッジ日時 2023-09-21 12:37:48
合計ジャッジ時間 3,186 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
20,428 KB
testcase_01 AC 47 ms
20,600 KB
testcase_02 AC 47 ms
18,500 KB
testcase_03 AC 49 ms
22,524 KB
testcase_04 AC 47 ms
20,480 KB
testcase_05 AC 46 ms
20,544 KB
testcase_06 AC 47 ms
18,444 KB
testcase_07 AC 48 ms
20,380 KB
testcase_08 AC 48 ms
20,484 KB
testcase_09 AC 47 ms
20,496 KB
testcase_10 AC 46 ms
20,440 KB
testcase_11 AC 46 ms
22,524 KB
testcase_12 AC 47 ms
18,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;


namespace StartFinish
{
    class Program
    {
        static void Main(string[] args)
        {
            var charArray = Console.ReadLine().ToCharArray();

            var length = charArray.Length;

            for (int i = 0; i < length; i++)
            {
                charArray[i] -= (char)((i + 1) % 26);
                if (charArray[i] < 'A')
                {
                    charArray[i] = (char)(charArray[i] + 26);
                }
            }
            foreach(var c in charArray)
            {
                Console.Write(c);
            }
            Console.WriteLine();
        }

    }
}


0