305608: CF1062D. Fun with Integers
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Fun with Integers
题意翻译
给定一个大于或等于$2$的正整数$n$。对于每对整数$a$和$b$,$(2≤|a|,|b|≤n)$,当且仅当存在整数x,满足$1<|x|$且$(a\cdot x=b$或$b\cdot x=a)$,才能将$a$转换为$b$,其中$|x|$表示$x$的绝对值。 在这样的转换之后,你的分数增加了$|x|$,并且你就不允许将再将$a$转换为$b$或$b$再转换为a了。 最初,您的得分为$0$.您可以从任何整数开始,并可以根据需要将其多次转换。求可以达到的最高分是多少?题目描述
You are given a positive integer $ n $ greater or equal to $ 2 $ . For every pair of integers $ a $ and $ b $ ( $ 2 \le |a|, |b| \le n $ ), you can transform $ a $ into $ b $ if and only if there exists an integer $ x $ such that $ 1 < |x| $ and ( $ a \cdot x = b $ or $ b \cdot x = a $ ), where $ |x| $ denotes the absolute value of $ x $ . After such a transformation, your score increases by $ |x| $ points and you are not allowed to transform $ a $ into $ b $ nor $ b $ into $ a $ anymore. Initially, you have a score of $ 0 $ . You can start at any integer and transform it as many times as you like. What is the maximum score you can achieve?输入输出格式
输入格式
A single line contains a single integer $ n $ ( $ 2 \le n \le 100\,000 $ ) — the given integer described above.
输出格式
Print an only integer — the maximum score that can be achieved with the transformations. If it is not possible to perform even a single transformation for all possible starting integers, print $ 0 $ .
输入输出样例
输入样例 #1
4
输出样例 #1
8
输入样例 #2
6
输出样例 #2
28
输入样例 #3
2
输出样例 #3
0