当前位置:网站首页>Approximate sum count (approximate
Approximate sum count (approximate
2022-07-02 11:11:00 【lcxdz】
Add link description
720 It's a very strange number
#include <bits/stdc++.h>
using namespace std;
//#define int long long
typedef long long ll;
ll result(ll n)
{
ll cnt = 0;
for (ll i = 1; i <= n / i; i++)
{
if (n % i == 0){
cnt += i;
if (n / i != i && n / i != n)
cnt += n / i;
}
}
cout<<cnt<<endl;
return cnt;
}
int main()
{
ll n;
cin >> n;
ll ans = 0;
while (n != 1)
{
ans++;
n = result(n);
}
cout << ans;
return 0;
}
边栏推荐
- Summary of cases of players' disconnection and reconnection in Huawei online battle service
- TIPC协议
- Regular and common formulas
- Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
- Flink two Open, implement Batch Lookup join (attached source)
- 洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
- [play with FPGA learning 5 in simple terms ----- reset design]
- TIPC介绍1
- [play with FPGA learning 4 in simple terms ----- talk about state machine design]
- 2022爱分析· 国央企数字化厂商全景报告
猜你喜欢

Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know

首份中国企业敏捷实践白皮书发布| 附完整下载

Common methods of JS array

JVM garbage collector

二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)

2022爱分析· 国央企数字化厂商全景报告

二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)

QT学习日记7——QMainWindow

JVM之垃圾回收器

TIPC 寻址2
随机推荐
[play with FPGA learning 2 in simple terms ----- design skills (basic grammar)]
使用华为性能管理服务,按需配置采样率
学习open62541 --- [66] UA_String的生成方法
sqlite 修改列类型
How does the whole network display IP ownership?
力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)
二叉树专题--AcWing 1497. 树的遍历(利用后、中序遍历,构建二叉树)
Calculate the sum of sequences
MySQL lethal serial question 4 -- are you familiar with MySQL logs?
Uncover the secrets of Huawei application market application statistics
TIPC messaging3
Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
Is the account above changtou school safe?
点云投影图片
From Read and save in bag file Jpg pictures and PCD point cloud
Hdu1234 door opener and door closer (water question)
JVM garbage collector
华为应用市场应用统计数据问题大揭秘
一.STM32的开发环境,keil5/MDK5.14安装教程(附下载链接)