結果

問題 No.1026 OGAWA's New Keyboard
ユーザー cedretaber
提出日時 2020-04-14 16:07:09
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 380 bytes
コンパイル時間 676 ms
コンパイル使用メモリ 102,800 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-22 06:39:07
合計ジャッジ時間 2,072 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto N = readln.chomp.to!int;
    char[] a, b;
    size_t i;
    foreach (_; 0..N) {
        auto ts = readln;
        if (ts[0] == '0') {
            a ~= ts[2];
        } else {
            b ~= ts[2];
        }
    }
    b.reverse();
    writeln(b ~ a);
}
0