結果

問題 No.18 うーさー暗号
ユーザー uma-pinehilluma-pinehill
提出日時 2018-05-22 18:31:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 594 bytes
コンパイル時間 2,211 ms
コンパイル使用メモリ 104,360 KB
実行使用メモリ 23,648 KB
最終ジャッジ日時 2023-09-11 01:16:55
合計ジャッジ時間 3,726 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
21,484 KB
testcase_01 AC 53 ms
21,488 KB
testcase_02 AC 52 ms
21,376 KB
testcase_03 AC 54 ms
21,492 KB
testcase_04 AC 53 ms
19,500 KB
testcase_05 AC 54 ms
23,648 KB
testcase_06 AC 54 ms
21,488 KB
testcase_07 AC 53 ms
23,528 KB
testcase_08 AC 53 ms
21,568 KB
testcase_09 AC 53 ms
21,388 KB
testcase_10 AC 52 ms
19,292 KB
testcase_11 AC 55 ms
23,484 KB
testcase_12 AC 54 ms
21,380 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;

public class Program
{
    static void Main()
    {
        string xx = new string(GetChar().ToArray());
        Console.WriteLine(xx);
    }
    
    static IEnumerable<char> GetChar(){
        int Moji = 0;
        int Count = 1;
        char tmp = (char)0;
        while((Moji = Console.Read()) != -1){
            if(Moji <65 || Moji >90){
                break;
            }
            tmp = (char)(( Moji - 65 + 26 - Count)%26 + 65);
            yield return tmp;
            Count = (Count + 1)%26;
        }
    }
}
0