luyencode / comments

Server lưu trữ bình luận trên Luyện Code
https://luyencode.net
6 stars 3 forks source link

https://oj.luyencode.net/problem/THETICH #675

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Chi tiết bài tập - Luyện Code Online

https://luyencode.net/problem/THETICH

quocbk commented 2 years ago

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.

Xem code AC

#include using namespace std; int main(){ long long n, i, s = 0; cin >> n; for(i = 1; i <= n; i++){ s += i; } cout << s * s; return 0; }

ghost commented 2 years ago

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.

Xem code AC

```cpp #include #define ug unsigned long long using namespace std; // Topic variable. ug n; // Auxiliary variable. //___________________ int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n; cout << n*n*(n+1)*(n+1) / 4; return 0; } ```

danh2006 commented 1 year ago

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.

Xem code AC

#include #define ll long long using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; ll sum = 0; for(int i=1;i<=n;i+=1){ sum+=i; } cout << sum*sum << endl; }

ThuanNqt commented 1 year ago

Ngắn gọn nhất

Xem code AC

#include using namespace std; typedef unsigned long long int ll; //THUẬN IT2-HUST ll sum(ll n){ return n*(n+1)/2; } int main(){ int n;cin>>n; cout<

thinh12012007 commented 1 year ago

Sử dụng công thức là ra :

include <bits/stdc++.h>

using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie();cout.tie(); short k;cin>>k; long long h=kkpow(k+1,2)/4; cout<<h; return 0; }

tuibixam commented 1 year ago

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.

Xem code AC

// #include using namespace std; long thetich(int n) { long thetich=n*n*n; return thetich; } int main() { ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0); int n; long long tong=0; cin >>n; for (int i=1;i<=n;i++) tong+=thetich(i); cout <

thinh12012007 commented 1 year ago

thanks aj

Vào Th 3, 3 thg 1, 2023 vào lúc 07:02 Dinh An @.***> đã viết:

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình. Xem code AC

// #include<bits/stdc++.h> using namespace std; long thetich(int n) { long thetich=nnn; return thetich; }

int main() { ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0); int n; long long tong=0; cin >>n; for (int i=1;i<=n;i++) tong+=thetich(i); cout <<tong; return 0; }

— Reply to this email directly, view it on GitHub https://github.com/luyencode/comments/issues/675#issuecomment-1369278959, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3VWBRIAL5JBTMRIQY2NJ4TWQNUCRANCNFSM5I435RLQ . You are receiving this because you commented.Message ID: @.***>