結果
問題 | No.1233 割り切れない気持ち |
ユーザー | titia |
提出日時 | 2020-09-19 04:06:51 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 10,792 KB |
実行使用メモリ | 31,608 KB |
最終ジャッジ日時 | 2023-09-05 03:10:51 |
合計ジャッジ時間 | 23,118 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 181 ms
11,388 KB |
testcase_01 | AC | 57 ms
11,252 KB |
testcase_02 | AC | 291 ms
11,324 KB |
testcase_03 | AC | 699 ms
17,800 KB |
testcase_04 | AC | 539 ms
17,692 KB |
testcase_05 | AC | 353 ms
11,408 KB |
testcase_06 | AC | 375 ms
11,392 KB |
testcase_07 | AC | 958 ms
20,232 KB |
testcase_08 | AC | 960 ms
22,080 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 841 ms
19,828 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 122 ms
19,188 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 199 ms
19,000 KB |
testcase_21 | AC | 206 ms
30,716 KB |
testcase_22 | AC | 209 ms
30,648 KB |
testcase_23 | AC | 199 ms
30,744 KB |
testcase_24 | AC | 199 ms
30,640 KB |
testcase_25 | AC | 204 ms
30,612 KB |
testcase_26 | AC | 191 ms
31,608 KB |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | AC | 55 ms
11,384 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
ソースコード
import sys input = sys.stdin.readline N=int(input()) A=sorted(map(int,input().split())) S=sum(A) U=[0]*(2*10**5+1) for a in A: U[a]+=1 from itertools import accumulate ACC=list(accumulate(U)) ANS=0 for i in range(2*10**5+1): if U[i]==0: continue ANS+=S*U[i] for j in range(i+i-1,2*10**5+1,i): ANS-=U[i]*i*(ACC[j]-ACC[j-i])*(j//i) print(ANS)