![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
分数
小耗子001
得到的和得不到的都是收获
展开
-
patA1081 Rational Sum(20)
#include <iostream>#include <cstdio>using namespace std;typedef long long ll;struct fraction{ ll up,down;};int gcd(int a,int b){ return b==0 ? a : gcd(b ,a % b);}fraction reduction(fractio...原创 2018-05-22 22:21:20 · 145 阅读 · 0 评论 -
patA1081 Ration Sum
#include <iostream>#include <cstdio>#include <cmath>using namespace std;const int maxn=100;typedef long long ll;struct Faction{ long long up,down;};Faction f[maxn];long long gcd(long...原创 2018-05-16 21:42:41 · 128 阅读 · 0 评论 -
patA1088 Rational Arithmetic
#include <iostream>#include <cstdio>#include <cmath>using namespace std;typedef long long ll;struct fraction{ ll up,down; };ll gcd(ll a,ll b){ return b==0 ? a : gcd(b,a%b);}fraction ...原创 2018-05-23 22:10:08 · 151 阅读 · 0 评论