結果

問題 No.1233 割り切れない気持ち
ユーザー marroncastlemarroncastle
提出日時 2020-09-18 23:00:34
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 108,824 KB
最終ジャッジ日時 2023-09-04 19:29:34
合計ジャッジ時間 17,125 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
75,724 KB
testcase_01 AC 77 ms
71,216 KB
testcase_02 AC 84 ms
75,268 KB
testcase_03 AC 101 ms
76,888 KB
testcase_04 AC 91 ms
76,420 KB
testcase_05 AC 81 ms
75,336 KB
testcase_06 AC 82 ms
75,248 KB
testcase_07 AC 293 ms
83,252 KB
testcase_08 AC 408 ms
89,152 KB
testcase_09 AC 743 ms
101,424 KB
testcase_10 AC 759 ms
104,636 KB
testcase_11 AC 241 ms
82,908 KB
testcase_12 AC 904 ms
108,676 KB
testcase_13 AC 859 ms
108,824 KB
testcase_14 AC 895 ms
108,412 KB
testcase_15 AC 923 ms
108,296 KB
testcase_16 AC 961 ms
108,560 KB
testcase_17 AC 145 ms
104,616 KB
testcase_18 AC 902 ms
106,948 KB
testcase_19 AC 180 ms
107,372 KB
testcase_20 AC 143 ms
104,612 KB
testcase_21 AC 205 ms
107,464 KB
testcase_22 AC 203 ms
107,328 KB
testcase_23 AC 202 ms
107,156 KB
testcase_24 AC 206 ms
107,352 KB
testcase_25 AC 202 ms
107,388 KB
testcase_26 AC 202 ms
107,636 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = sum(A)*N
A.sort()
from bisect import *
for a in A:
  for p in range(a,A[-1]+1,a):
    ind = bisect_left(A,p)
    ans -= a*(N-ind)
print(ans)
0