結果

問題 No.3032 Unavailability of Inequality Signs
ユーザー はむ吉🐹はむ吉🐹
提出日時 2018-02-03 22:21:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 635 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 79,236 KB
最終ジャッジ日時 2023-09-12 15:58:05
合計ジャッジ時間 3,305 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env pypy3


def compare(a, b):
    if a == b:
        return 0
    else:
        return (a - b) // abs(a - b)


# 入力チェック用 assert つき
def main():
    n = int(input())
    assert compare(1, n) != 1 and compare(n, 10) != 1
    for _ in range(n):
        a, b = (int(x) for x in input().split())
        assert compare(1, a) != 1 and compare(a, 10 ** 8) != 1
        assert compare(1, b) != 1 and compare(b, 10 ** 8) != 1
        c = compare(a, b)
        if c == 1:
            print("G")
        elif c == 0:
            print("E")
        else:
            print("L")


if __name__ == '__main__':
    main()
0