結果

問題 No.1439 Let's Compare!!!!
ユーザー FromBooskaFromBooska
提出日時 2023-03-17 16:12:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 690 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 81,740 KB
実行使用メモリ 77,512 KB
最終ジャッジ日時 2023-10-18 13:43:15
合計ジャッジ時間 3,598 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,404 KB
testcase_01 AC 41 ms
53,412 KB
testcase_02 AC 38 ms
53,400 KB
testcase_03 AC 41 ms
53,420 KB
testcase_04 AC 42 ms
55,520 KB
testcase_05 AC 40 ms
53,456 KB
testcase_06 AC 38 ms
53,408 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 392 ms
77,512 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

# まずNはintで受けるのか、文字列で受けるのか
# 長さ10**5はintには巨大すぎるか

N = int(input())
S = input()
T = input()

#print(S, T)

# eval('015')はできないみたいよ

Q = int(input())
for i in range(Q):
    query = list(map(str, input().split()))
    if query[0] == 'S':
        d = int(query[1])-1
        S = S[:d]+query[2]+S[d+1:]
    elif query[0] == 'T':
        d = int(query[1])-1
        T = T[:d]+query[2]+T[d+1:]
    evalS = eval(S.lstrip('0'))
    evalT = eval(T.lstrip('0'))
    if evalS > evalT:
        print('>')
    elif evalS < evalT:
        print('<')
    elif evalS == evalT:
        print('=')
    #print('S', evalS, 'T', evalT)
0