

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
`Code:`
#include<bits/stdc++.h>
using namespace std;
unsigned long long int n;
void solve(){
cin >> n;
double sum = 1.0;
for (int i = 2; i <= n; i++) sum += 1.0 / pow(i, 3);
cout << fixed << setprecision(5) << sum << "\n";
}
int main(){
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
solve();
return 0;
}
$\text{#Chúc bạn học tốt!}$
$\text{#KL0112}$
Hãy giúp mọi người biết câu trả lời này thế nào?

#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
double s=0;
int main()
{
cin>>n;
for(ll i=1;i<=n;i++) s+=1.0/(pow(i,3));
cout<<fixed<<setprecision(5)<<s;
}
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
