![](https://img-blog.csdnimg.cn/20200416101619520.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
❤❤❤ 数论❤❤❤
math
Mongo_girl
哈哈哈哈哈哈哈哈
展开
-
【算法笔记】— 数学问题之分数的四则运算
1.分数的表示 struct Fraction{ int up;//分子 int down;//分母 }; ①分数的表示形式为假分数 ②如果分数为负数,则让分子为负数,分母为正数 ③如果分数恰为0,则让分子为0,分母为1 ④分数要求最简(即分子和分母没有除了1以外的公约数) 2.分数的化简 Fraction reduction(Fraction res){ if(res.do...原创 2019-02-01 15:02:28 · 684 阅读 · 0 评论 -
PAT (Advanced Level) Practice — 1088 Rational Arithmetic (20 分)
题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805378443755520 For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, differen...原创 2019-02-01 17:20:49 · 187 阅读 · 0 评论