PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000020. Đếm cặp phần nguyên bằng phần dư (Floor and Mod)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Đếm cặp phần nguyên bằng phần dư (Floor and Mod)
Floor and Mod
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
An ordered positive-integer pair is special when . Given bounds , count special pairs with and .
Input
One line containing .
Output
Print the count of special pairs.
Subtasks
- Subtask 1 (20 points):
- Subtask 2 (30 points):
- Subtask 3 (50 points):
Examples
Input
3 4
Output
1
Explanation
The only special pair is , since both the quotient and remainder are .