NOJ/30/main.c

19 lines
320 B
C
Raw Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
int main(void){
double x;
unsigned long long k,y;
scanf("%llu",&k);
for(y = k; y < 9999999999999; y++){
x = k*y/(double)(y-k);
if(x < y) break;
if(x - (int)x < 10e-6){
unsigned long long b,s;
b = x>y?x:y;
s = x<y?x:y;
printf("1/%llu=1/%llu+1/%llu\n",k,b,s);
}
}
return 0;
}