結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-10-25 00:58:29 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 23 ms / 5,000 ms | 
| コード長 | 1,436 bytes | 
| コンパイル時間 | 961 ms | 
| コンパイル使用メモリ | 105,856 KB | 
| 実行使用メモリ | 17,408 KB | 
| 最終ジャッジ日時 | 2024-07-07 06:38:40 | 
| 合計ジャッジ時間 | 1,844 ms | 
| ジャッジサーバーID (参考情報) | judge1 / 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;
namespace yukicode {
    public class Program {
        public static string Solver(System.IO.TextReader reader) {
            const string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            var s = reader.ReadLine();
            var sb = new System.Text.StringBuilder();
            for (var i = 1; i <= s.Length; ++i) {
                var p = alphabet.IndexOf( s[ i -1] )+1;
                var q = ( p > i % 26 ? 0 : 26 ) + p - i % 26-1;
                sb.Append( alphabet[ q ] );
            }
            return sb.ToString();
        }
        private static void Main() {
            Console.WriteLine( Solver( Console.In ) );
        }
    }
    public class MyLib {
        public static string Ordinalization(int num) {
            string surfix = "stndrdth";
            return string.Format( "{0}{1}", num,
                ( 0 < num % 10 && num % 10 <= 4 ) && ( ( num % 100 ) / 10 != 1 ) ?
                surfix.Substring( ( num % 10 - 1 ) * 2, 2 ) : surfix.Substring( 6 ) );
        }
        public static List<int> GetIntList(string input, char delimitor) {
            return input.Split( delimitor ).ToList<string>().ConvertAll<int>( int.Parse );
        }
        public static List<int> GetIntList(string input, char[] delimitors) {
            return input.Split( delimitors ).ToList<string>().ConvertAll<int>( int.Parse );
        }
    }
}
            
            
            
        