結果
| 問題 |
No.1233 割り切れない気持ち
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-18 23:04:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 186 bytes |
| コンパイル時間 | 736 ms |
| コンパイル使用メモリ | 82,132 KB |
| 実行使用メモリ | 78,172 KB |
| 最終ジャッジ日時 | 2024-06-22 17:13:44 |
| 合計ジャッジ時間 | 24,115 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 2 WA * 37 |
ソースコード
N = int(input())
A = list(range(1,N+1))
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)