結果

問題 No.1225 I hate I hate Matrix Construction
ユーザー uni_python
提出日時 2020-09-12 18:14:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 54,592 KB
最終ジャッジ日時 2025-01-02 11:12:53
合計ジャッジ時間 3,118 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32 WA * 3
権限があれば一括ダウンロードができます

ソースコード

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