Số kỳ lạ (b)

View as PDF

Submit solution

Points: 1.00 (partial)
Time limit: 1.0s
Memory limit: 1001M
Input: stdin
Output: stdout

Problem type
Allowed languages
Python, Scratch

Số ~u~ ~(1 < u < N)~ được gọi là ước số kỳ lạ của ~N~ nếu ~N / u = N~ ~mod~ ~u~ (trong đó ~/~ là phép chia lấy phần nguyên; ~mod~ là phép chia lấy phần dư). Ví dụ: khi ~N = 15~ thì ~4~ là một ước số kì lạ của ~15~ vì ~15/4 = 3~ và ~15~ ~mod~ ~4 = 3~.

Cho ~2~ số tự nhiên ~A~, ~B~ ~(2 < A < B \le 10^5)~, hãy đếm số lượng các ước số kì lạ của tất cả các số nằm trong khoảng từ ~A~ tới ~B~.

Ví dụ
Sample Input
4
6
Sample Output
3

Comments

Please read the guidelines before commenting.



  • 0
    hoanguyen  commented on May 10, 2025, 11:05 a.m.

    cho xem cot cua xuanphat2014


    • 0
      KConnor77  commented on May 10, 2025, 2:57 p.m.

      cũng sai 4 câu vì quá thời gian


    • 0
      KConnor77  commented on May 10, 2025, 2:57 p.m.

      có thể: import math as m a, b = int(input("")), int(input("")) i = a-1 report = 0 while i!=b: i+=1 for u in range(i): if m.floor(i/(u+1))==i%(u+1): report+=1 print(int(report))


  • 3
    xuanphat2014  commented on May 9, 2025, 7:20 a.m.

    sai 4 câu vì quá thời gian


  • -8
    jackhihi  commented on May 3, 2025, 8:43 a.m.

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