当前位置:网站首页>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;
}
边栏推荐
- 点云投影图片
- [paid promotion] collection of frequently asked questions, recommended list FAQ
- 【深入浅出玩转FPGA学习5-----复位设计】
- QT学习日记7——QMainWindow
- 【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
- 洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
- Calculate the sum of sequences
- 洛谷 P3398 仓鼠找 sugar(树上倍增 lca 判断树中两条路径是否相交 结论)
- Huawei game failed to initialize init with error code 907135000
- 从.bag文件中读取并保存.jpg图片和.pcd点云
猜你喜欢
使用华为性能管理服务,按需配置采样率
Hdu1228 a + B (map mapping)
一招快速实现自定义快应用titlebar
二叉树专题--AcWing 3384. 二叉树遍历(已知先序遍历 边建树 边输出中序遍历)
TIPC addressing 2
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)
二叉树专题--AcWing 1589. 构建二叉搜索树
LabVIEW为什么浮点数会丢失精度
OpenMLDB Meetup No.4 会议纪要
随机推荐
点云投影图片
快应用中实现自定义抽屉组件
Huawei game failed to initialize init with error code 907135000
JSP webshell free -- the basis of JSP
HDU1234 开门人和关门人(水题)
Is the account above changtou school safe?
Use of vscode tool
Summary of cases of players' disconnection and reconnection in Huawei online battle service
主键策略问题
二叉树专题--P1030 [NOIP2001 普及组] 求先序排列
How to implement tabbar title bar with list component
Special topic of binary tree -- [deep base 16. Example 7] ordinary binary tree (simplified version) (multiset seeks the precursor and subsequent sentry Art)
【深入浅出玩转FPGA学习4----漫谈状态机设计】
Calculate the sum of sequences
正则及常用公式
【AppLinking实战案例】通过AppLinking分享应用内图片
【深入浅出玩转FPGA学习3-----基本语法】
Implementation of six singleton modes
How to use ide to automatically sign and debug Hongmeng application
OpenMLDB Meetup No.4 会议纪要