文件名
输入文件:"Number of factors.in"
输出文件:"Number of factors.out"
题目描述
花花在写一道题,题目是这样描述的:
给定一个正整数 ,求 的因数的个数,。
聪明的花花开始写代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n==1) cout<<1;
else if(n==2) cout<<2;
else if(n==3) cout<<2;
...
else if(n==N) cout<<...;
else cout<<...;
return 0;
}
你需要补足 "..." 的部分并输出花花的代码。
请仔细注意格式。
输入格式
输入一个正整数 ,含义如题所示
输出格式
输出花花的代码
样例
2
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n==1) cout<<1;
else cout<<2;
return 0;
}
10
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n==1) cout<<1;
else if(n==2) cout<<2;
else if(n==3) cout<<2;
else if(n==4) cout<<3;
else if(n==5) cout<<2;
else if(n==6) cout<<4;
else if(n==7) cout<<2;
else if(n==8) cout<<4;
else if(n==9) cout<<3;
else cout<<4;
return 0;
}
附件:点击下载
数据范围
对于30%的数据,
对于全部的数据,