結果

問題 No.1439 Let's Compare!!!!
ユーザー da_ab
提出日時 2021-03-26 22:42:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 582 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,484 KB
最終ジャッジ日時 2024-11-29 00:34:13
合計ジャッジ時間 12,164 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 RE * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

# 1439 : Let's Compare!!!!

import numpy as np
from sys import stdin

colNum=int(stdin.readline())
intST=[0]*2
S=0
T=1
intST[S]=int(stdin.readline().rstrip())
intST[T]=int(stdin.readline().rstrip())
Q=int(stdin.readline())

for i in range(Q):
    c,x,y=stdin.readline().split()
    x=int(x)-1
    y=int(y)
    if c=='S':
        tgt=S
    else:
        tgt=T
    nThCol=np.floor(intST[tgt]/10**(colNum-(x+1))%10)
    intST[tgt]+=(y-nThCol)*10**(colNum-(x+1))
    if intST[S]>intST[T]:
        print('>')
    elif intST[S]<intST[T]:
        print('<')
    else:
        print('=')


0