結果
問題 |
No.701 ひとりしりとり
|
ユーザー |
![]() |
提出日時 | 2018-09-06 10:08:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 237 ms / 2,000 ms |
コード長 | 629 bytes |
コンパイル時間 | 814 ms |
コンパイル使用メモリ | 111,004 KB |
実行使用メモリ | 27,760 KB |
最終ジャッジ日時 | 2024-11-21 11:09:45 |
合計ジャッジ時間 | 2,157 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); if (n == 1) { Console.WriteLine("n"); goto end; } Console.WriteLine("a"); for (int i = 0; i < n -2; i++) Console.WriteLine("a" + getS(i) + "a"); Console.WriteLine("an" ); end:; } public static string getS(int n) { var a = "abcdefghijklmnopqrstuvwxyz"; var ans = new char[4]; for (int i = 0; i < 4; i++) { ans[i] = a[n % 26]; n /= 26; } return new string(ans); } }