Showing:
Handle Score
@Ibrahim Nash 5761
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4944
@saiujwal13083 4506
@sanjay05 3762
@marius_valentin_dragoi 3516
@sushant_a 3459
@verma_ji 3341
@KshamaGupta 3318
Ishaan's Sum Problem
Basic Accuracy: 35.91% Submissions: 39 Points: 1

Ishaan is curious about numbers. He takes any 2 random numbers A and B. He wants to find out that whether A can be written as a sum of B distinct positive integers.Help him find out whether it is possible or not.

Example 1:

Input: A = 5, B = 2
Output: 1
Explanation: 5 can be written as a
sum of 2 numbers : 1+4 or 2+3.


Example 2:

Input: A = 6, B = 2
Output: 1
Explanation: 6 can be written as a
sum of 2 numbers : 1+5 or 2+4.


You dont need to read input or print anything. Complete the function kthDistinct() which takes n as input parameter and returns 1 if it is possible
else return 0.

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Constraints:
1<= A, B <=106