最小的n

This commit is contained in:
2025-08-04 11:12:52 +08:00
parent 689639109d
commit 3e37187d3f

View File

@@ -1,18 +1,14 @@
#include "iostream" #include "iostream"
using namespace std; using namespace std;
//最小的n
float s=0,n=1;
int main() { int main() {
int n,a; while (s<5) {
cin >>n; s=s+1/n;
for (int i=0;i<n; i++) { n++;//n=n+1 n+=1
cin>>a; //cout <<s<<"|"<<1.0/n<<"|"<<n<<endl;
if(a%10<=4){
cout <<a/10*10<<endl;
}else{
cout <<a/10*10+10<<endl;
}
} }
cout <<n<<endl;
return 0; return 0;
} }