Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138735 刘轻松 拆分分数 C++ Wrong Answer 0 MS 260 KB 265 2025-11-29 16:42:46

Tests(1/20):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int x,y,k; scanf("%d",&k); for(int x=k+1;x<=2*k;x++){ if(k*x%(x-k)==0)y = (k*x)/(x-k); if((x*y)%(x+y)==0 && (x*y)/(x+y)==k){ printf("1/%d = 1/%d + 1/%d\n",k,x,y); } } return 0; }


Run Info:

------Input------
9135
------Answer-----
1/9135 = 1/9136 + 1/83457360 1/9135 = 1/9138 + 1/27825210 1/9135 = 1/9140 + 1/16698780 1/9135 = 1/9142 + 1/11930310 1/9135 = 1/9144 + 1/9281160 1/9135 = 1/9150 + 1/5572350 1/9135 = 1/9156 + 1/3982860 1/9135 = 1/9160 + 1/3347064 1/9135 = 1/9162 + 1/3099810 1/9135 = 1/9164 + 1/2886660 1/9135 = 1/9170 + 1/2393370 1/9135 = 1/9180 + 1/1863540 1/9135 = 1/9184 + 1/1712160 1/9135 = 1/9198 + 1/1333710 1/9135 = 1/9210 + 1/1121778 1/9135 = 1/9216 + 1/1039360 1/9135 = 1/9222 + 1/968310 1/9135 = 1/9240 + 1/8
------Your output-----
1/9135 = 1/9540 + 1/215180 1/9135 = 1/9570 + 1/200970 1/9135 = 1/9576 + 1/198360 1/9135 = 1/9660 + 1/168084 1/9135 = 1/9702 + 1/156310 1/9135 = 1/9744 + 1/146160 1/9135 = 1/9810 + 1/132762 1/9135 = 1/9860 + 1/124236 1/9135 = 1/9870 + 1/122670 1/9135 = 1/9918 + 1/115710 1/9135 = 1/9976 + 1/108360 1/9135 = 1/10080 + 1/97440 1/9135 = 1/10150 + 1/91350 1/9135 = 1/10360 + 1/77256 1/9135 = 1/10440 + 1/73080 1/9135 = 1/10458 + 1/72210 1/9135 = 1/10556 + 1/67860 1/9135 = 1/10710 + 1/62118 1/9135 = 1/109