超简单题解
2025-08-15 13:19:52
发布于:浙江
1阅读
0回复
0点赞
(好像是叫桶排序?)
#include<iostream>
using namespace std;
bool a[42];//42种可能的取模结果
int main(){
int cnt=0;//计数(几种取模结果)
for(int i=0;i<10;i++){
int x;
cin>>x;
int y=x%42;
if(a[y]==false){
a[y]=true;
cnt++;
}
}
cout<<cnt;
return 0;
}
这里空空如也
有帮助,赞一个