結果
問題 |
No.327 アルファベット列
|
ユーザー |
![]() |
提出日時 | 2015-12-27 02:08:35 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 693 bytes |
コンパイル時間 | 3,123 ms |
コンパイル使用メモリ | 113,272 KB |
実行使用メモリ | 29,468 KB |
最終ジャッジ日時 | 2024-09-19 07:19:28 |
合計ジャッジ時間 | 3,589 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 WA * 21 |
コンパイルメッセージ
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; namespace ConsoleApplication3 { class Program { private static readonly List<char> ConvertTable = Enumerable.Range(0x41, 26).Select(x => (char) x).ToList(); static void Main(string[] args) { var n = long.Parse(Console.ReadLine()); var fst = new[] {ConvertTable[(int) (n%26)]}; var sec = Enumerable.Range(0, 10000).Select(_ => { return n /= 26; }).TakeWhile(x => x != 0).Select(x => ConvertTable[(int) (--x%26)]); var foo = fst.Concat(sec).Reverse().ToArray(); Console.WriteLine(foo.Aggregate(new StringBuilder(), (b, c) => b.Append(c)).ToString()); } } }