BALLSUM  Ball sum
You have a bag filled with N balls.Each Ball has a distinct number from 1 to N printed on it.All the numbers are distinct. You withdraw two balls from the bag and take their sum. You need to calculate the probability that the sum is not greater than the given number K(<=N). The Answer should be displayed in the form of p/q.(except when the answer is 0 or 1)
Input
Input consists of various test cases. Each test case consist of two integer inputs,N and K. (0<=K<=N<=1000000000) The program stops taking input when N and K equals 1
Output
Output the result in the form of p/q.(Except when the answer is 0 or 1)
Example
Input: 3 2 100 5 10 6 1 1 Output: 0 2/2475 2/15
hide comments
fuadul_hasan:
20200625 10:42:51
ohh.....! at last i have done it 

letuantam96:
20190313 08:54:19
phewwww. finally AC


sagar_june97p:
20190102 17:20:53
Last edit: 20190102 17:22:31 

kushagra_2:
20181214 14:06:04
got it in O(1) :) easy problem needs gcd!!! 

anirudnits:
20180425 08:48:01
Got 4 WA's and finally an AC with the same code!!! 

flyingduchman_:
20180410 12:35:00
Note that K <= N. Last edit: 20180422 08:11:52 

hello_world123:
20180315 11:08:24
getting tle


srinu_viratian:
20180111 14:55:13
for n=k=0=1


bayulaxana:
20171229 17:45:39
Very Nice problem...


jha4032:
20171227 13:01:56
O(1).............. :) 
Added by:  Prateek Agarwal 
Date:  20151215 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU JSMONKEY 