第16行
  • 板块灌水区
  • 楼主huboxuan
  • 当前回复2
  • 已保存回复2
  • 发布时间2024/10/13 11:09
  • 上次更新2024/10/13 12:27:43
查看原帖
第16行
1015155
huboxuan楼主2024/10/13 11:09
#include <bits/stdc++.h>
using namespace std;
int compute(long long n,long long k);
int main(){
	short t;
	scanf("%hd",&t);
	for(short i=0;i<t;i++){
		long long n,k;
		scanf("%lld%lld",&n,&k);//被除数、商 
		compute(n,k);
	}
	return 0;
}
int compute(long long n,long long k){
	int total=0;
	bool remember[1e14+1]=false;
	for(long long i=1;i<=n;i++)//除数 
		remember[n%i]=true;
	for(int i=0;i<n;i++)
		total+=int(remember[i]);
	return total;
}//返回有多少个 
2024/10/13 11:09
加载中...