結果

問題 No.1439 Let's Compare!!!!
ユーザー brthyyjp
提出日時 2021-03-26 21:40:23
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 968 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 76,852 KB
最終ジャッジ日時 2024-11-28 22:20:12
合計ジャッジ時間 2,286 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

import sys
import io, os
input = sys.stdin.readline
#input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n = int(input())
s = int(input())
t = int(input())
S = list(str(s))
T = list(str(t))
S = ['0']*(n-len(S))+S
T = ['0']*(n-len(T))+T
#print(S)
#print(T)
#N = 2*10**5+50
#table = [0]*(N+1)
#table[0] = 1
#for i in range(1, N+1):
#table[i] = table[i-1]*10
q = int(input())
for i in range(q):
c, x, y = map(str, input().rstrip().split())
#print(c, x, y)
x, y = int(x), int(y)
x -= 1
if c == 'S':
#s -= int(S[x])*table[n-1-x]
#s += y*table[n-1-x]
s -= int(S[x])*pow(10, n-1-x)
s += y*pow(10, n-1-x)
S[x] = str(y)
else:
#t -= int(T[x])*table[n-1-x]
#t += y*table[n-1-x]
t -= int(T[x])*pow(10, n-1-x)
t += y*pow(10, n-1-x)
T[x] = str(y)
#print(s, t)
if s > t:
print('>')
elif s == t:
print('=')
else:
print('<')
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0