結果

問題 No.3032 Unavailability of Inequality Signs
ユーザー algon_320algon_320
提出日時 2018-04-01 22:19:00
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 1,162 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 8,796 KB
最終ジャッジ日時 2023-09-08 12:37:50
合計ジャッジ時間 1,133 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,764 KB
testcase_01 AC 21 ms
8,652 KB
testcase_02 AC 21 ms
8,624 KB
testcase_03 AC 19 ms
8,704 KB
testcase_04 AC 20 ms
8,652 KB
testcase_05 AC 20 ms
8,796 KB
testcase_06 AC 19 ms
8,704 KB
testcase_07 AC 20 ms
8,652 KB
testcase_08 AC 19 ms
8,664 KB
testcase_09 AC 20 ms
8,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from collections import deque
import heapq
from collections import Counter
import math

# ------------------------------------------------------
class IN:
    @staticmethod
    def singleInt():
        return int(input())

    @staticmethod
    def singleStr():
        return input()

    @staticmethod
    def listInt():
        return list(map(int, input().split()))

    @staticmethod
    def listStr():
        return input().split()
# ------------------------------------------------------
def contain(c, x):
    return (x in c)

def str_reverse(s):
    return s[::-1]

def ctoi(c):
    return int.from_bytes(c.encode(), byteorder='big')
def itoc(x):
    return x.to_bytes((x.bit_length() + 7) // 8, byteorder='big').decode()

INF = 1001001001001001001
# ------------------------------------------------------

if __name__ == '__main__':
    N = IN.singleInt()
    for i in range(N):
        a, b = IN.listInt()
        if a == b:
            print("=")
        elif math.sqrt((a - b) * (a - b)) == (a - b):
            print(itoc(ctoi(";")+3))
        else:
            print(itoc(ctoi(";")+1))


0