結果

問題 No.1801 Segment Game
ユーザー buey_tbuey_t
提出日時 2023-03-23 16:02:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 529 ms / 2,000 ms
コード長 1,347 bytes
コンパイル時間 1,385 ms
コンパイル使用メモリ 81,652 KB
実行使用メモリ 90,824 KB
最終ジャッジ日時 2023-10-18 19:33:53
合計ジャッジ時間 7,238 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
84,432 KB
testcase_01 AC 523 ms
90,700 KB
testcase_02 AC 523 ms
90,700 KB
testcase_03 AC 523 ms
90,700 KB
testcase_04 AC 526 ms
90,676 KB
testcase_05 AC 526 ms
90,824 KB
testcase_06 AC 528 ms
90,820 KB
testcase_07 AC 455 ms
90,224 KB
testcase_08 AC 458 ms
90,336 KB
testcase_09 AC 529 ms
90,232 KB
testcase_10 AC 131 ms
84,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
    from heapq import heapify, heappop, heappush
    from bisect import bisect_left, bisect_right
    from copy import deepcopy
    import copy
    import random
    from collections import deque,Counter,defaultdict
    from itertools import permutations,combinations
    from decimal import Decimal,ROUND_HALF_UP
    #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    from functools import lru_cache, reduce
    #@lru_cache(maxsize=None)
    from operator import add,sub,mul,xor,and_,or_,itemgetter
    INF = 10**18
    mod1 = 10**9+7
    mod2 = 998244353
    
    #DecimalならPython
    
    
    '''
    
    
    
    '''
    
    for _ in range(int(input())):
        H,W,D = map(int, input().split())
        
        if W%2 == 1:
            d1 = H*H+1
        else:
            d1 = H*H
        
        if H%2 == 1:
            d2 = W*W+1
        else:
            d2 = W*W
        
        d = min(d1,d2)
        
        if D*D >= d:
            print('N')
        else:
            print('S')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0