CF935A.Fafa and his Company

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

Fafa 拥有一家承接大型项目的公司。Fafa 的公司共有 nn 名员工。每当公司启动一个新项目时,Fafa 都需要将该项目的任务分配给所有员工。

Fafa 发现每次都要手动完成这项工作,对他而言非常疲惫。因此,他决定从公司中选出最优的 ll 名员工作为团队负责人。每当有新项目启动时,Fafa 将仅在这些团队负责人之间分配任务,而每位团队负责人需负责若干(正整数个)员工,并向其所负责的员工分派任务。为了保证该过程对团队负责人公平,每位团队负责人所负责的员工人数必须完全相同。此外,每一位非团队负责人的员工必须且仅能隶属于一位团队负责人,且任何团队负责人不得隶属于其他团队负责人。

已知员工总数为 nn,请计算 Fafa 有多少种方式选择团队负责人人数 ll,使得能够将所有员工均匀地分配给这些团队负责人。

输入格式

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

输入包含一行,其中有一个正整数 nn(2 ≤ n ≤ 1052 \leq n \leq 10^5)——表示 Fafa 公司的员工人数。

输出格式

Print a single integer representing the answer to the problem.

输出一个整数,表示该问题的答案。

输入输出样例

  • 输入#1

    2

    输出#1

    1
  • 输入#2

    10

    输出#2

    3

说明/提示

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.

在第二个样例中,Fafa 有 3 种方案:

  • 仅选择 1 名员工作为团队负责人,其下有 9 名员工向他负责。
  • 选择 2 名员工作为团队负责人,每名负责人各有 4 名员工向其负责。
  • 选择 5 名员工作为团队负责人,每名负责人各有 1 名员工向其负责。

输入解题思路,AI测评打分。不知道怎么写?

首页