Problem description

Fafa owns a company that works on huge projects. There are n employees in Fafa's company. Whenever the company has a new project to start working on, Fafa has to divide the tasks of this project among all the employees.

Fafa finds doing this every time is very tiring for him. So, he decided to choose the best l employees in his company as team leaders. Whenever there is a new project, Fafa will divide the tasks among only the team leaders and each team leader will be responsible of some positive number of employees to give them the tasks. To make this process fair for the team leaders, each one of them should be responsible for the same number of employees. Moreover, every employee, who is not a team leader, has to be under the responsibility of exactly one team leader, and no team leader is responsible for another team leader.

Given the number of employees n, find in how many ways Fafa could choose the number of team leaders l in such a way that it is possible to divide employees between them evenly.

Input

The input consists of a single line containing a positive integer n (2 ≤ n ≤ 105) — the number of employees in Fafa's company.

Output

Print a single integer representing the answer to the problem.

Examples

Input

2

Output

1

Input

10

Output

3

Note

In the second sample Fafa has 3 ways:

  • choose only 1 employee as a team leader with 9 employees under his responsibility.
  • choose 2 employees as team leaders with 4 employees under the responsibility of each of them.
  • choose 5 employees as team leaders with 1 employee under the responsibility of each of them.

解题思路:结合提示,再多举几个栗子,将会发现问题求解其实是求n的因子个数(不包括n),水过!

AC代码:

 #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int num=;
for(int i=;i<=n/;++i)
if(n%i==)num++;
cout<<num<<endl;
return ;
}

C - Fafa and his Company的更多相关文章

  1. Elasticsearch索引(company)_Centos下CURL增删改

    目录 返回目录:http://www.cnblogs.com/hanyinglong/p/5464604.html 1.Elasticsearch索引说明 a. 通过上面几篇博客已经将Elastics ...

  2. Microsoft Dynamics AX 2012: How to get Company,Customer and Vendor address in AX 2012

    Scenario:  “How to get Addresses of “Customer, Vendor and Company” 1)      First we need to identify ...

  3. poj1416 Shredding Company

    Shredding Company Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5379   Accepted: 3023 ...

  4. CodeForces 125E MST Company

    E. MST Company time limit per test 8 seconds memory limit per test 256 megabytes input standard inpu ...

  5. CF 321B Kefa and Company(贪心)

    题目链接: 传送门 Kefa and Company time limit per test:2 second     memory limit per test:256 megabytes Desc ...

  6. 搜索+剪枝 POJ 1416 Shredding Company

    POJ 1416 Shredding Company Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5231   Accep ...

  7. 二分+动态规划 POJ 1973 Software Company

    Software Company Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 1112   Accepted: 482 D ...

  8. 【Moqui业务逻辑翻译系列】Story of Online Retail Company 在线零售公司的故事

    h1. Story of Online Retail Company 在线零售公司的故事 Someone decides to sell a product. [Product Marketer Ma ...

  9. Codeforces 556D Restructuring Company

    传送门 D. Restructuring Company time limit per test 2 seconds memory limit per test 256 megabytes input ...

随机推荐

  1. CPU指令、机器码、程序和汇编语言

    一.指令 指令就是指挥机器工作的指示和命令.控制器靠指令指挥机器工作,人们用指令表达自己的意图,并交给控制器执行.一台计算机所能执行的各种不同指令的全体,叫做计算机的指令系统或指令集,每一台计算机均有 ...

  2. js的基础运用

    总结: 1.定义:分为隐式定义和显式定义可以先定义后赋值. 2.+:当两边都是数值则运行加法运算,若一遍是字符型则进行拼接. 3.数值变字符:数值变量.toString()方法. 字符变数值:通过加一 ...

  3. [转]linux内存管理源码分析 - 页框分配器

    转自: http://www.cnblogs.com/tolimit/ 阅读之前,先敬原作者一杯! 分段和分页 先看一幅图 也就是我们实际中编码时遇到的内存地址并不是对应于实际内存上的地址,我们编码中 ...

  4. c发邮件

    /* base64编码 */ static const char* base64_enc_map = \ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno ...

  5. linux学习7-数据流重定向

    数据流重定向 实验介绍 你可能对重定向这个概念感到些许陌生,但你应该在前面的课程中多次见过>或>>操作了,并知道他们分别是将标准输出导向一个文件或追加到一个文件中.这其实就是重定向, ...

  6. codeforeces近日题目小结

    题目源自codeforeces的三场contest contest/1043+1055+1076 目前都是solved 6/7,都差了最后一题 简单题: contest/1043/E: 先不考虑m个限 ...

  7. ReatEasy+用户指南----第9章@MatrixParam

    转载说明出处:http://blog.csdn.net/nndtdx/article/details/6870391 原文地址 http://docs.jboss.org/resteasy/docs/ ...

  8. 刷新PHP缓冲区

    为你的站点加速_php技巧 在当前 PHP 版本的默认配置下,“输出缓冲(Output Buffering)”是被打开的.旧版本则不是这样,在旧版本的 PHP 中,字符串在每次被输出的时候(通过 ec ...

  9. hdu_1020_Encoding_201310172120

    Encoding Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total S ...

  10. windows与linux下配置ant

    转自:http://www.cnblogs.com/wuxinrui/archive/2012/01/06/2314392.html 1.下载:到ANT官方网站http://ant.apache.or ...