結果

問題 No.701 ひとりしりとり
ユーザー nebukuro09nebukuro09
提出日時 2018-06-15 22:28:31
言語 D
(dmd 2.105.2)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 623 bytes
コンパイル時間 1,714 ms
コンパイル使用メモリ 100,076 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-03 20:25:11
合計ジャッジ時間 1,448 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 4 ms
4,376 KB
testcase_11 AC 25 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto N = readln.chomp.to!int;
    auto ans = new dchar[](20);
    ans.fill('a');

    void incl() {
        for (int i = 18; i >= 1; --i) {
            ans[i] += 1;
            if (ans[i] > 'z') {
                ans[i] = 'a';
            } else {
                break;
            }
        }
    }

    while (N--) {
        if (N == 0)
            ans[$-1] = 'n';
        ans.writeln;
        incl;
    }
}
0