結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  No | 
| 提出日時 | 2016-06-15 23:23:06 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 19 ms / 5,000 ms | 
| コード長 | 793 bytes | 
| コンパイル時間 | 716 ms | 
| コンパイル使用メモリ | 110,172 KB | 
| 実行使用メモリ | 25,540 KB | 
| 最終ジャッジ日時 | 2024-07-07 06:10:32 | 
| 合計ジャッジ時間 | 1,445 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace yukikoda
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] c = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
            string ans = "";
            for (int i = 1; i <= s.Length; i++)
            {
                int a = Array.IndexOf(c, s[i - 1].ToString());
                int b = a - i;
                while (b < 0)
                {
                    b = b + 26;
                }
                ans += c[b];
            }
            Console.WriteLine(ans);
        }
    }
}
            
            
            
        