結果

問題 No.1225 I hate I hate Matrix Construction
ユーザー chielochielo
提出日時 2020-09-11 21:39:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 1,338 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 71,416 KB
最終ジャッジ日時 2023-08-27 12:29:49
合計ジャッジ時間 5,722 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
70,956 KB
testcase_01 AC 74 ms
71,232 KB
testcase_02 AC 75 ms
71,024 KB
testcase_03 AC 74 ms
71,144 KB
testcase_04 AC 74 ms
71,120 KB
testcase_05 AC 72 ms
71,240 KB
testcase_06 AC 77 ms
71,024 KB
testcase_07 AC 74 ms
70,932 KB
testcase_08 AC 73 ms
71,292 KB
testcase_09 AC 74 ms
71,060 KB
testcase_10 AC 72 ms
71,000 KB
testcase_11 AC 73 ms
71,152 KB
testcase_12 AC 73 ms
71,268 KB
testcase_13 AC 71 ms
71,096 KB
testcase_14 AC 72 ms
71,108 KB
testcase_15 AC 72 ms
71,196 KB
testcase_16 AC 72 ms
71,060 KB
testcase_17 AC 72 ms
70,996 KB
testcase_18 AC 70 ms
70,896 KB
testcase_19 AC 73 ms
71,284 KB
testcase_20 AC 72 ms
70,912 KB
testcase_21 AC 74 ms
71,000 KB
testcase_22 AC 73 ms
70,996 KB
testcase_23 AC 73 ms
71,152 KB
testcase_24 AC 72 ms
70,904 KB
testcase_25 AC 73 ms
71,104 KB
testcase_26 AC 72 ms
71,260 KB
testcase_27 AC 73 ms
70,956 KB
testcase_28 AC 73 ms
70,900 KB
testcase_29 AC 73 ms
71,064 KB
testcase_30 AC 73 ms
71,216 KB
testcase_31 AC 79 ms
71,336 KB
testcase_32 AC 72 ms
71,152 KB
testcase_33 AC 73 ms
71,292 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tina = 2 in a
tinb = 2 in b
if tina and tinb:
    print(n ** 2)
elif tina:
    print(a.count(2) * n + a.count(1))
elif tinb:
    print(b.count(2) * n + b.count(1))
else:
    print(max(a.count(1), b.count(1)))
0