DÃY SỐ

View as PDF

Submit solution

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

Problem type
Allowed languages
Python, Scratch


Comments

Please read the guidelines before commenting.



  • 0
    huynhbaonam061012   commented on May 24, 2023, 9:30 a.m.

    Mọi người ơi giúp mình với. Mình đang làm bài trên scratch mà không biết sao cứ bị lỗi quá thời gian. Mong mọi người giúp đỡ.


  • -1
    nguyenvietkhoa   commented on May 6, 2023, 9:52 a.m.

    Trước tiên lấy N rồi trừ cho 1 do quy luật bắt đầu từ số thứ 1. Bài này thì cứ nhảy 2 số thì tăng thêm 5. Vậy thì tính floor của N / 2 * 5. Sau đó kiểm tra xem N có phải là số lẻ không. Nếu có thì cộng thêm 2 vào. Sau đó thì in ra kết quả vừa ra + 1 do số đầu tiên là 1. Nếu có sai sót gì thì mn nói nha!


    • 0
      ltnhan_1405   commented on May 17, 2023, 9:20 p.m.

      này là bạn đang phức tạp hóa vấn đề lên r đấy


  • 3
    MaiThanh1342   commented on April 12, 2023, 11:08 a.m. edited

    Bài này dùng DFS trên cây segment tree nhé mọi người


  • -5
    duybao6B   commented on April 6, 2023, 9:32 a.m.

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


  • 3
    DANH_LAM_VU   commented on July 1, 2022, 10:20 a.m. edit 2

    Ừ ĐÚNG RỒI BẠN 1208 NÓI ĐÚNG LẮM


  • -30
    nguyenloc2204   commented on June 29, 2022, 8:32 a.m.

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


    • -14
      quangminhvt   commented on June 30, 2022, 3:45 p.m.

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


    • 12
      NguyenTungDuong1208   commented on June 29, 2022, 11:09 a.m.

      đây là chỗ học mà bạn 😡😡😡😡😡😡


  • -14
    ththn2022   commented on June 25, 2022, 5:22 p.m.

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


    • 1
      quangminhvt   commented on July 2, 2022, 3:24 p.m.

      Làm thế nào thế


      • 5
        No_name_01   commented on July 23, 2022, 8:20 a.m.

        n = int(input()) if (n == 1): print(1) elif (n == 2): print(3) else: print((n * 2 + (n - 2)//2) - (n % 2 == 0))