結果

問題 No.1233 割り切れない気持ち
ユーザー marroncastlemarroncastle
提出日時 2020-09-18 23:04:20
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 1,155 ms
コンパイル使用メモリ 86,764 KB
実行使用メモリ 108,788 KB
最終ジャッジ日時 2023-09-04 19:32:05
合計ジャッジ時間 16,107 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,836 KB
testcase_01 AC 73 ms
71,200 KB
testcase_02 AC 78 ms
75,188 KB
testcase_03 AC 98 ms
77,232 KB
testcase_04 AC 88 ms
76,392 KB
testcase_05 AC 78 ms
75,472 KB
testcase_06 AC 79 ms
75,164 KB
testcase_07 AC 275 ms
83,380 KB
testcase_08 AC 391 ms
89,232 KB
testcase_09 AC 705 ms
101,276 KB
testcase_10 AC 732 ms
104,700 KB
testcase_11 AC 234 ms
82,876 KB
testcase_12 AC 874 ms
108,680 KB
testcase_13 AC 823 ms
108,788 KB
testcase_14 AC 872 ms
108,192 KB
testcase_15 AC 887 ms
108,720 KB
testcase_16 AC 928 ms
108,440 KB
testcase_17 AC 139 ms
104,500 KB
testcase_18 AC 876 ms
107,096 KB
testcase_19 AC 173 ms
107,304 KB
testcase_20 AC 138 ms
104,464 KB
testcase_21 AC 197 ms
107,420 KB
testcase_22 AC 197 ms
107,120 KB
testcase_23 AC 198 ms
107,400 KB
testcase_24 AC 200 ms
107,420 KB
testcase_25 AC 198 ms
107,620 KB
testcase_26 AC 197 ms
107,516 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