結果
| 問題 | No.701 ひとりしりとり |
| コンテスト | |
| ユーザー |
ekidenp
|
| 提出日時 | 2018-06-15 22:36:50 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 282 ms / 2,000 ms |
| コード長 | 640 bytes |
| コンパイル時間 | 916 ms |
| コンパイル使用メモリ | 110,004 KB |
| 実行使用メモリ | 21,504 KB |
| 最終ジャッジ日時 | 2024-06-30 15:05:33 |
| 合計ジャッジ時間 | 2,335 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;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
string str = Console.ReadLine();
int N = int.Parse(str);
string w = "";
string aaa = "abcdefghijklmopqrstuvwxyz";
for(var i=0;i<N-1;i++){
w = "";
w += aaa.Substring(i%25,1);
w += aaa.Substring((i/25/25/25/25/25)%25,1);
w += aaa.Substring((i/25/25/25/25)%25,1);
w += aaa.Substring((i/25/25/25)%25,1);
w += aaa.Substring((i/25/25)%25,1);
w += aaa.Substring((i/25)%25,1);
w += aaa.Substring((i+1)%25,1);
Console.WriteLine(w);
}
string w2 = aaa.Substring((N-1)%25,1) + "n";
Console.WriteLine(w2);
}
}
ekidenp