結果
| 問題 | No.701 ひとりしりとり |
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2018-09-06 10:08:52 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 151 ms / 2,000 ms |
| コード長 | 629 bytes |
| 記録 | |
| コンパイル時間 | 1,721 ms |
| コンパイル使用メモリ | 104,704 KB |
| 実行使用メモリ | 22,272 KB |
| 最終ジャッジ日時 | 2026-05-15 15:03:48 |
| 合計ジャッジ時間 | 2,525 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}
bluemegane