結果

問題 No.2513 Power Eraser
ユーザー 👑 amentorimaruamentorimaru
提出日時 2023-06-16 18:44:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 594 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 11,876 KB
実行使用メモリ 42,420 KB
最終ジャッジ日時 2023-10-20 21:04:26
合計ジャッジ時間 19,988 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 480 ms
42,420 KB
testcase_01 AC 486 ms
42,420 KB
testcase_02 AC 485 ms
42,420 KB
testcase_03 AC 567 ms
42,420 KB
testcase_04 TLE -
testcase_05 AC 687 ms
42,420 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
7_evil_case_1.txt -- -
7_evil_case_2.txt -- -
7_evil_case_3.txt -- -
7_evil_case_4.txt -- -
7_evil_case_5.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import numpy as np
input = sys.stdin.readline
def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for _ in range(N)]

def main():
    n=int(input())
    a=read_list()
    na=np.array(a, dtype=object)
    a.reverse()
    ans=1
    ans2=1
    for i in range(len(a)):
        na=na[:-1]
        mul1=np.prod(na-a[i])%998244353
        ans*=mul1
        ans%=998244353
        	
    print(ans)   

if __name__ == "__main__":
    main()
0