TỔNG CÁC SỐ LẺ

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 512M
Input: stdin
Output: stdout

Problem type
Allowed languages
C++, Pascal, Python


Comments

Please read the guidelines before commenting.



  • 0
    KV24A_240   commented on July 8, 2024, 9:04 a.m.

    Code: N = int(input()) “xuống dòng” print(N*N)


  • 0
    KV24A_240   commented on July 8, 2024, 9:03 a.m.

    Code nè(python 3) N = int(input()) print(N*N)


  • 0
    newbie_GM   commented on July 5, 2024, 11:07 p.m.

    Khá dễ giành cho newbie mới tạo acc


  • 0
    songvu1234567890   commented on July 5, 2024, 9:08 a.m.

    print(n×n) hoặc sc=1+(n-1)×2 xuống dòng print((1+sc)×n//2)


  • 0
    haiminh   commented on July 4, 2024, 11:06 a.m. edit 2

    thế này là đúng nè:(python)

    n = int(input("")) .xuống dòng.
    print(n*n)


  • -1
    tn   commented on July 3, 2024, 5:05 p.m. edit 2

    include <bits/stdc++.h>

    using namespace std; using ll = long long; using db = double;

    define F for(int i =

    define F1 for(int j =

    const int MAXN = 100000001; const int INF = 1e9; const int MAXA =100001;

    /*

    1+3+5+... 1+1+2+3+2+... 1+1+21+1+22+... 1+(n-1)+(n-1+1)(n-1)/22 n+n*(n-1)

    n*n

    */

    int main() {
        #ifndef ONLINE_JUDGE
        freopen("INPUT.INP","r",stdin);
        freopen("OUTPUT.OUT","w",stdout);
        #endif
        ios_base::sync_with_stdio(false);
        cin.tie(0); cout.tie(0);
        int n;
        cin>>n;
        cout<<(long long)n*n;
    }
    

  • 1
    tamduc   commented on July 3, 2024, 4:41 p.m. edited

    mình thấy khá dễ


  • 1
    kukuku12345   commented on June 30, 2024, 10:44 a.m.

    hint: cày trâu: tạo một dãy số lẻ(nhớ là chỉ lặp tương đương vs n) rồi làm thui:v cách nhanh: nhận xét:ta thấy số cuối = n*2-1 ta sẽ áp dụng nhận xét trên vào cách tính tổng số số hạng cách đều thế là xong :v


  • 3
    thienthansanga2k13   commented on June 27, 2024, 10:02 a.m. edited

    bài này khá cơ bản, có thể cho các bạn mới đăng nhập


  • 0
    SK24_D167   commented on June 13, 2024, 1:56 p.m.

    Mình thấy dễ thật


  • 1
    truongphat   commented on June 11, 2024, 1:30 p.m.

    cho mình xin code C++


  • -1
    truongphat   commented on June 11, 2024, 1:29 p.m.

    =))


  • -7
    Thanhnk   commented on June 7, 2024, 9:28 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -9
    minhtht   commented on June 7, 2024, 9:31 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • 2
    TheHaivui123   commented on June 4, 2024, 9:26 p.m. edited

    dễ 1 lần là xong là: python: n=int(input()) print(n*n)


    • 0
      SK24_A560   commented on July 2, 2024, 9:58 p.m.

      n * n nên để lại thành n ** 2 nhé


    • 0
      SK23A_414   commented on June 6, 2024, 3:48 p.m.

      quá đúng code ngắn nữa


    • -10
      kietjumper   commented on June 5, 2024, 7:13 p.m.

      This comment is hidden due to too much negative feedback. Show it anyway.


  • 2
    Camthao   commented on June 4, 2024, 10:50 a.m.

    khá dễ


  • 0
    hphongqb2012   commented on May 11, 2024, 10:21 a.m.

    1