結果

問題 No.1225 I hate I hate Matrix Construction
ユーザー uni_pythonuni_python
提出日時 2020-09-12 18:14:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 71,488 KB
最終ジャッジ日時 2023-08-30 17:38:35
合計ジャッジ時間 4,347 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,100 KB
testcase_01 AC 68 ms
71,360 KB
testcase_02 AC 67 ms
71,244 KB
testcase_03 AC 69 ms
71,232 KB
testcase_04 AC 69 ms
71,304 KB
testcase_05 AC 68 ms
71,212 KB
testcase_06 AC 69 ms
71,400 KB
testcase_07 AC 67 ms
71,232 KB
testcase_08 AC 67 ms
71,488 KB
testcase_09 AC 69 ms
71,328 KB
testcase_10 AC 67 ms
71,328 KB
testcase_11 AC 69 ms
71,448 KB
testcase_12 AC 71 ms
71,448 KB
testcase_13 AC 68 ms
71,176 KB
testcase_14 AC 68 ms
71,264 KB
testcase_15 AC 68 ms
71,424 KB
testcase_16 AC 69 ms
71,224 KB
testcase_17 AC 69 ms
71,148 KB
testcase_18 AC 69 ms
71,060 KB
testcase_19 AC 69 ms
71,248 KB
testcase_20 AC 68 ms
71,212 KB
testcase_21 AC 71 ms
71,324 KB
testcase_22 AC 70 ms
71,264 KB
testcase_23 AC 70 ms
71,472 KB
testcase_24 AC 72 ms
71,432 KB
testcase_25 AC 72 ms
71,312 KB
testcase_26 AC 72 ms
71,412 KB
testcase_27 AC 71 ms
71,448 KB
testcase_28 AC 71 ms
71,428 KB
testcase_29 AC 73 ms
71,216 KB
testcase_30 AC 72 ms
71,244 KB
testcase_31 AC 68 ms
71,400 KB
testcase_32 AC 70 ms
71,424 KB
testcase_33 AC 69 ms
71,144 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    S=LI()
    T=LI()
    
    def calc(S):
        temp=0
        for i in range(N):
            if S[i]==1:
                temp+=1
            elif S[i]==2:
                temp+=N
        return temp
        
    ans=max(calc(S),calc(T))
    print(ans)
    
    


main()
0