【BZOJ 4459】【JSOI 2013】丢番图
来源:互联网 发布:农民网络电视台直播 编辑:程序博客网 时间:2024/05/22 13:05
答案就是
分解质因数就好了。
#include<cmath>#include<cstdio>#include<vector>#include<queue>#include<cstring>#include<iomanip>#include<stdlib.h>#include<iostream>#include<algorithm>#define ll long long#define inf 1000000000#define mod 1000000007#define N 100000#define fo(i,a,b) for(i=a;i<=b;i++)#define fd(i,a,b) for(i=a;i>=b;i--)using namespace std;ll res,n;int i,idx;int main(){ scanf("%lld",&n); res = 1; fo(i,2,(int)sqrt(n)) { idx = 0; while (n % i == 0) {idx++; n/=i;} res *= idx * 2 + 1; } if (n-1) res *= 3; printf("%lld\n",(res+1)>>1); return 0;}
0 0
- 【BZOJ 4459】【JSOI 2013】丢番图
- 【JSOI 2013】密码
- BZOJ 1823 JSOI 2010 满汉全席 2-SAT
- BZOJ 1028 JSOI 2007 麻将 贪心
- 【JSOI 2008】【BZOJ 1014】火星人prefix
- 【JSOI 2008】【BZOJ 1017】魔兽地图DotR
- BZOJ 1823 JSOI 2010 满汉全席 2-SAT
- 【BZOJ 1012】【JSOI 2008】最大数maxnumber
- 【BZOJ 1012】【JSOI 2008】最大数
- 【BZOJ 1029】【JSOI 2007】建筑抢修
- BZOJ 1013 [JSOI 2008] 高斯消元 解题报告
- [BZOJ]1014 [JSOI]2008 火星人prefix Splay
- [Wikioi 2913][BZOJ 1029][JSOI 2007]建筑抢修
- BZOJ 1012 JSOI 2008 最大数 maxnumber 线段树水题
- BZOJ 1452 JSOI 2009 Count 二维树状数组
- BZOJ 1032 JSOI 2007 祖码Zuma 区间DP
- BZOJ 1031 JSOI 2007 字符加密Cipher 后缀数组
- BZOJ 1030 JSOI 2007 文本生成器 AC自动机+DP
- maven找不到lib解决方法
- C++之deque
- java命令行引用jar包
- TCP 回射程序
- git问题处理
- 【BZOJ 4459】【JSOI 2013】丢番图
- 利用ActivityGroup实现Tab分页标签
- PPA方式安装jdk8
- oracle 11g 64位安装32位客户端和PL/SQL
- Unity携程实现渐隐效果
- ThreadLocal本地线程变量的理解
- 【原创】最好的Python IDE:Eclipse + pydev
- ElasticSearch 5.x 部署及常见问题
- MyBatis简介与配置MyBatis+Spring+MySql