问题 G: Factors of Factorial

时间限制: 1 Sec  内存限制: 128 MB
提交: 57  解决: 33
[提交][状态][讨论版][命题人:admin]

题目描述

You are given an integer N. Find the number of the positive divisors of N!, modulo 109+7.

Constraints
1≤N≤103

输入

The input is given from Standard Input in the following format:
N

输出

Print the number of the positive divisors of N!, modulo 109+7.

样例输入

3

样例输出

4

提示

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

 

水题,差点没做出来,就很尬。

阶乘拆成质因子乘积,根据每种质因子可以取的数量,由乘法原理得到答案

代码略

【数论】Factors of Factorial @upcexam6503的更多相关文章

  1. Factors of Factorial AtCoder - 2286 (N的阶乘的因子个数)(数论)

    Problem Statement You are given an integer N. Find the number of the positive divisors of N!, modulo ...

  2. B - Factors of Factorial

    Problem Statement You are given an integer N. Find the number of the positive divisors of N!, modulo ...

  3. AtCoder Beginner Contest 052 ABCD题

    A - Two Rectangles Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement The ...

  4. 【AtCoder】ARC067

    ARC067 C - Factors of Factorial 这个直接套公式就是,先求出来每个质因数的指数幂,然后约数个数就是 \((1 + e_{1})(1 + e_{2})(1 + e_{3}) ...

  5. UVa 884 - Factorial Factors

    题目:输出n!中素数因数的个数. 分析:数论.这里使用欧拉筛法计算素数,在计算过程中求解就可以. 传统筛法是利用每一个素数,筛掉自己的整数倍: 欧拉筛法是利用当前计算出的全部素数,乘以当前数字筛数: ...

  6. HDOJ-1124 Factorial 数论

    题意哇:求N!末尾多少个0. 很容易想到转化为求N!中5因子的个数.但是从数据范围来看必然不可能一个一个算出来. 所以这里借用数论的一个知识. 如果p是素数,那么n!中p因子的个数可以表示为1-n中整 ...

  7. zoj 3621 Factorial Problem in Base K 数论 s!后的0个数

    Factorial Problem in Base K Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onli ...

  8. hdu 1124 Factorial(数论)

    题意: 求n!的尾0的个数 分析: 0一定是由因子2和5相乘产生的: 2的个数显然大于5的个数,故只需统计因子5的个数 n/5不能完全表示n!中5的个数(egg: 25),应该n/=5后,累加上n/2 ...

  9. HDU 1124 Factorial (数论)

    http://acm.hdu.edu.cn/showproblem.php? pid=1124 題目好長好長,好可怕,看完腎都萎了,以後肯定活不長.我可不能死在這種小事上,小灰灰我勵志死在少女的超短裙 ...

随机推荐

  1. YOLO V2 代码分析

    先介绍YOLO[转]: 第一个颠覆ross的RCNN系列,提出region-free,把检测任务直接转换为回归来做,第一次做到精度可以,且实时性很好. 1. 直接将原图划分为SxS个grid cell ...

  2. word图片自动编号,前面加章节号

    老实说很多人都没有系统性地学过WORD,毕竟所见即所得,就是学过也比较浅.那么在使用word写作论文时就会感到很烦,因为你想要控制好章节,这样很多的地方就可以按照这种章节自动编号,处理不同节的页眉和页 ...

  3. 【Android】Android取消EditText自动获取焦点

    解决方法: 在EditText的父级控件中找一个,设置成 android:focusable="true" android:focusableInTouchMode="t ...

  4. Ubuntu学习

    一. Ubuntu简介 Ubuntu(乌班图)是一个基于Debian的以桌面应用为主的Linux操作系统,据说其名称来自非洲南部祖鲁语或科萨语的“ubuntu”一词,意思是“人性”.“我的存在是因为大 ...

  5. 查出了a表,然后对a表进行自查询,a表的别名t1,t2如同两张表,因为t1,t2查询的条件不一样,真的如同两张表,关联两张表,可以将两行或者多行数据合并成一行,不必使用wm_concat()函数。为了将t2表的数据全部查出来使用了右连接。

    with a as( select nsr.zgswj_dm, count(distinct nsr.djxh) cnt, 1 z from hx_fp.fp_ly fp, hx_dj.dj_nsrx ...

  6. Mex-hdu4747(DP)

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=4747 题目大意:给一个含有n个数的序列 ns[1~n],定义函数 mex(l,r)为区间 [l,r] 中未 ...

  7. Python虚拟环境的安装和配置-virtualenv与windows下多个python版本共存

    Python虚拟环境的安装和配置-virtualenv与windows下多个python版本共存 windows下多个python版本共存 https://www.python.org/downloa ...

  8. Apache系列:Centos7.2下安装与配置apache

    Centos7.2下安装与配置apache(一) 配置机:腾讯云服务器,centos7.2 一.安装Apache服务(Apache软件安装包叫httpd) yum install httpd -y 二 ...

  9. css3组件之几何图形

    一.平行四边形 1.实心无边框 #parallelogram { width: 150px; height: 100px; -webkit-transform: skew(20deg); -moz-t ...

  10. 845. Greatest Common Divisor

    描述 Given two numbers, number a and number b. Find the greatest common divisor of the given two numbe ...