A x B + C SOLUTION AtCoder Beginner Contest 179

A x B + C SOLUTION

Problem Statement
Given is a positive whole number N . The number of tuples ( A , B , C ) of positive numbers fulfill A × B + C =
N ?
Limitations
2 ≤ N ≤ 10
6
All qualities in input are numbers.
Info
Info is given from Standard Input in the accompanying configuration:
N
Yield
Print the appropriate response.
Test Input 1
Duplicate
3
Test Output 1
Duplicate
3
There are
3
tuples of numbers that fulfill
A × B + C = 3 : ( A , B , C ) = ( 1 , 1 , 2 ) , ( 1 , 2 , 1 ) , ( 2 , 1 , 1 ) .
Test Input 2
Duplicate
100
Test Output 2
Duplicate
473
Test Input 3
Duplicate
1000000
Test Output 3
Duplicate
13969985

Leave a Comment