結果

問題 No.201 yukicoderじゃんけん
ユーザー norioc
提出日時 2017-08-13 12:27:15
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 601 bytes
コンパイル時間 1,556 ms
コンパイル使用メモリ 113,956 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 21:33:49
合計ジャッジ時間 2,258 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm;
import std.array;
import std.bigint;
import std.conv;
import std.math;
import std.stdio;
import std.string;
import std.range;

int readint() {
    return readln.chomp.to!int;
}

int[] readints() {
    return readln.split.map!(to!int).array;
}

void main() {
    auto ss = readln.split;
    auto name1 = ss[0];
    auto val1 = BigInt(ss[1]);

    auto ts = readln.split;
    auto name2 = ts[0];
    auto val2 = BigInt(ts[1]);

    if (val1 == val2) {
        writeln(-1);
    }
    else if (val1 > val2) {
        writeln(name1);
    }
    else {
        writeln(name2);
    }
}

0