結果
問題 |
No.327 アルファベット列
|
ユーザー |
|
提出日時 | 2023-08-16 13:18:57 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 594 bytes |
コンパイル時間 | 1,160 ms |
コンパイル使用メモリ | 112,288 KB |
実行使用メモリ | 28,996 KB |
最終ジャッジ日時 | 2024-11-25 02:24:23 |
合計ジャッジ時間 | 4,101 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 49 |
コンパイルメッセージ
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 yukicoder { public class Program { public static void Main() { var n = long.Parse(Console.ReadLine()) + 1; var a = new List<long>(); while (n > 26) { a.Add(n % 26); n /= 26; } a.Add(n); var A = a.Select(x => (char)(x + 'A' - 1)); foreach(var b in A) { Console.Write(b); } Console.WriteLine(); } } }