❤❤❤ 数论❤❤❤
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 · 665 阅读 · 0 评论 -
PAT (Advanced Level) Practice — 1088 Rational Arithmetic (20 分)
题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805378443755520For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, differen...原创 2019-02-01 17:20:49 · 178 阅读 · 0 评论