cf 465 A. Fafa and his Company

手把手复现金蝶云星空V8.1文件上传漏洞(附完整POC与修复方案) 本文深度解析金蝶云星空V8.1文件上传漏洞,提供详细的漏洞复现步骤与完整POC,涵盖技术原理、测试环境搭建及验证流程。同时给出多维防护方案,包括官方补丁部署、临时缓解措施和长期安全加固建议,帮助企业有效防范任意文件上传风险。 阅读详情
A. Fafa and his Company
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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
Copy
2
Output
1
Input
Copy
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.

#include <bits/stdc++.h>
using namespace std;
typedef long long ll ;
typedef double    dl ;
#define INF 0x7f
const dl maxn =1e3+5; 

#define f(i,l,r) for(int i=l;i<=r;++i)
#define g(i,l,r) for(int i=l;i>=r;--i)
 int n;
int main()
{
     
  //  freopen("in","r",stdin);
    cin>>n;
    int ans=0;
    f(i,1,n>>1)
    {
    	if( n%i==0)
    		ans++;
    }

    cout<<ans<<endl;

    return 0; 
}
未来的我一定会感谢现在正在成长的我











Oracle Primavera P6实战手册:从入门到精通的企业项目管理秘籍 本文详细介绍了Oracle Primavera P6在企业项目管理中的实战应用,从环境配置到高级进度控制技巧,帮助用户从入门到精通。通过WBS设计、资源优化和情景模拟等核心功能,提升项目管理效率。特别适合需要处理复杂项目和多团队协作的企业用户。 阅读详情

相关推荐

使用嘉立创绘制STM32F103T8C6最小系统板

使用嘉立创EDA绘制一个属于自己的STM32最小系统板

weixin_67887035的博客 1万+

CF935A Fafa and his Company 题解

CF935A Fafa and his Company 题解

yaosichengalpha的博客 1108

Elasticsearch连接中断:深入解析Connection reset by peer问题及优化策略

本文深入解析Elasticsearch连接中断问题,特别是Connection reset by peer错误的成因与解决方案。从TCP层的心跳机制到客户端与服务端的配置差异,详细介绍了网络不稳定、防火墙拦截等常见原因,并提供了六种优化策略,包括KeepAlive调整、TCP参数调优和智能重试机制等,帮助提升Elasticsearch连接的稳定性。

weixin_42546392的博客 410

A. Fafa and his Company

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...

码农的一亩三分地 514

Win11系统下Abaqus2022与VS2022+oneAPI2023环境配置全攻略(附VUMAT子程序避坑指南)

本文详细指导在Windows 11系统下,为Abaqus 2022配置Visual Studio 2022与Intel oneAPI 2023的Fortran编译环境,以支持VUMAT等用户子程序开发。内容涵盖软件安装顺序、环境变量关联、快捷方式修改及关键验证步骤,并提供了首个VUMAT子程序的实战编写与模型验证方法,帮助用户高效搭建稳定可靠的仿真开发平台。

pytorch8learner的博客 317

Python 爬虫实战:亚马逊 + eBay 商品信息跨平台抓取(价格 / 销量 / 评价对比)

亚马逊和 eBay 是全球知名的电商平台,拥有海量的商品信息。对于消费者来说,比较不同平台上的商品价格、销量和用户评价可以帮助他们找到性价比最高的商品。对于商家而言,了解竞争对手的商品信息有助于优化自身的产品策略和定价策略。然而,手动在两个平台上逐一比较商品信息是非常耗时且低效的。因此,开发一个能够自动抓取并对比这两个平台商品信息的爬虫工具具有重要的实际意义。

yansideyucsdn的博客 617

Codeforces Round #465 (Div. 2) A. Fafa and his Company 水题

A. Fafa and his Companytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFafa owns a company that works on huge projects. There are n employees in Fa...

Frost_Bite的博客 754

游戏大厂射击游戏无缝大世界游戏DS服务器架构设计方案详解

摘要: 本文深入解析游戏大厂无缝大世界射击游戏的分布式服务器(DS)架构设计方案。以《和平精英》《量子特攻》为例,阐述如何通过动态分区、兴趣管理、弹性扩缩等核心技术应对高并发、低延迟、无缝切换等挑战。架构分为世界协调层、分区计算层、物理判定层等模块,结合微服务化、快照同步和Kubernetes调度,实现玩家跨区无感知迁移与一致判定。重点优化动态负载均衡、状态同步算法及容灾备份,依托分布式数据库与多云部署保障高可用性,为同类游戏提供可扩展的技术范本。(149字) 关键词: 无缝大世界、分布式服务器、动态分区、

本博客聚焦游戏开发技巧、创业实战心得及大学热门课程干货。这里既有技术深度,也有思维广度,无论你是开发者、创业者还是高校学子,都能在这里找到适合自己的成长之路! 563

Codeforces Round #465 (Div. 2) A. Fafa and his Company

A. Fafa and his CompanyFafa 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 task...

s540239976的博客 565

SolidWorks速成教程P4-4【装配体 | 第四节】——装配体内修改模型&编辑配合方法&配合报错的解决方法

截止目前已介绍完 SolidWorks装配体的常用功能,但基础薄弱的小伙伴或许对装配体的各类功能还不够熟悉。所以这节将进一步加强装配体的学习,同时介绍新手容易犯的错误。总结出三点,一是装配体内修改模型,二是编辑配合,三是配合报错的解决方法。

嵌入式阿齐Archie 5552

CKS-CN考试之路----11

显然是alpine-b的镜像有libcrypto3-3.1.4-r5。新版本发布老版本会被回收,此时pod只剩下2个container。我们依次测试是哪个镜像里包含libcrypto3。可以看到alpine的pod有3个副本.

Q先生 652

A. Fafa and his Company(思维题)Codeforces Round #465 (Div. 2)

原题链接:http://codeforces.com/problemset/problem/935/A 题意:有n个员工,从中选取i个领导人,要求每个领导人带的员工是相同的,且领导人带的员工数目不能为0。求选取的方案数 解题思路:我们可以这样思考,最少可以有1个领导人,最多可以有n/2个领导人。那么我们再看看选取的成立条件,我们选完i个领导人之后还剩n-i个员工,如果这些员工能平分给i个领导人,那么就符合条件,所以我们只需要遍历从1到n/2判断可不可行,统计方案数即可。 AC代码: /* *邮箱:2825

pursuit的博客 520

Unet++改进33:添加ConvolutionalGLU(2024最新改进方法)|紧凑的网络结构和高效的运算

由于残差连接的深度退化效应,许多依赖堆叠层进行信息交换的高效视觉变形模型往往不能形成足够的信息混合,导致视觉感知不自然。为了解决这个问题,在本文中,我们提出了聚合注意力,这是一种基于仿生设计的令牌混合器,它模拟生物中央凹视觉和连续眼运动,同时使特征映射上的每个令牌具有全局感知。此外,我们结合了可学习的令牌,与传统的查询和键交互,这进一步多样化了亲和矩阵的生成,而不仅仅依赖于查询和键之间的相似性。我们的方法不依赖于堆叠进行信息交换,从而有效地避免了深度退化,实现了自然的视觉感知。

AIcurator的博客 684

codeforces 935 A. Fafa and his Company

有最少人数限制的分组,求总人数的真因子的个数

toby的博客 352

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

fafa

 package fafa; class queue{  public static final int SIZE=1000;  public int[] x;  public int[] y;  public int x_fornt;  public int x_rear;  public int y_fornt;  public int y_rear;  public

xyjqaqforever的博客 296

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

法法在分配工作

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 amon...

qq_45793174的博客 218

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

新生赛003 E fafa在分配工作

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...

JustMessifans的博客 271

CodeForces 935A(求因数个数)

A. Fafa and his Companytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFafa owns a company that works on huge projects. There are n employees in Fa...

qq_38182397的博客 469

凉心的比赛(一)题解

A - 最小的二进制数 B - 线段的包含关系 C - 地下城还有劳拉 E - 法法在分配工作 F - 法法要穿过大门

weixin_44600242的博客 618

Fafa and his Company

题目 样例 这道题典型的思维题,但是因为数据小,所以暴力模拟就好了! #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <map> #include &l...

cf刷题随笔 200

signature=4a882a48c4a4b2b41835e11b6fafa69f,ABB 38SC980002R375

产品详情1CD3D22B52E5768DD8CE0FA56726D1517CDB0EDD6F1C8ABB07270197919A75C4821899B62F1595EE68D72EE25BCC67B249D130587DD6ED52C2C590311B4FA50D045AB9FFD4FBD6E672A4846552BD9BBD31669CB118419FBA7FC6B7846FB9C75341CA...

weixin_35667833的博客 9万+

cf 468 C. Convenient For Everybody

恶心........ 知道怎么做就是时间没算出来,你说尴不尴尬从国外友人哪里学到 时间打法 循环余 改变时间 看代码简单易懂版本C. Convenient For Everybodytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn dist...

PragIncor的博客 800

cf462 A Twisty Movement

标准动态规划dp [i][j][0] 从i 到 j 的有多少1结尾的非递增子序列 ( 21 或 1 )dp [i][j][1] 从i 到 j 的有多少2结尾的非递增子序列 只有2 处理一下 多少个1 多少个 2 ,就可以get  C. A Twisty MovementA dragon symbolizes wisdom, power and wealth. On Lunar Ne...

PragIncor的博客 706

cf 464 B. Hamster Farm

B. Hamster Farmtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima has a hamsters farm. Soon N hamsters will grow up on it and Dima will ...

PragIncor的博客 661

cf 465 B. Fafa and the Gates

B. Fafa and the Gatestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo neighboring kingdoms decided to build a wall between them with some gates...

PragIncor的博客 589

cf 464 D. Love Rescue

快速栈 虽然修改比较麻烦 但是 直接字符数组乱搞了 就是替换 D. Love Rescuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValya and Tolya are an ideal pair, but they quarrel s...

PragIncor的博客 576
上一篇: cd A Colourful Prospect
下一篇: cf 465 B. Fafa and the Gates
PragIncor
博客等级 码龄9年 1粉丝 59原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值