摘要:
Source: PAT A1088 Rational Arithmetic (20 分) Description: For two rational numbers, your task is to implement the basic arithmetics, that is, to calcu 阅读全文
摘要:
Source: PAT A1081 Rational Sum (20 分) Description: Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum 阅读全文
摘要:
Date:2019-07-05 19:35:27 算法实现 1 /* 分数的表示和化简 */ 2 /* 3 1.分数的表示 4 */ 5 6 // 7 //1.down非负,若分数为负,则令up为负 8 //2.分数为零,则令up=0, down=1 9 //3.up和down的gcd=1 10 / 阅读全文
摘要:
Date:2019-07-05 19:22:40 算法实现 阅读全文
摘要:
Source: PAT A1139 First Contact (30 分) Description: Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle 阅读全文
摘要:
Source: PAT A1124 Raffle for Weibo Followers (20 分) Description: John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for 阅读全文
摘要:
Source: PAT A1130 Infix Expression (25 分) Description: Given a syntax tree (binary), you are supposed to output the corresponding infix expression, wi 阅读全文
摘要:
Source: PAT A1091 Acute Stroke (30 分) Description: One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the r 阅读全文
摘要:
Date:2019-07-03 14:29:02 走完一层的所有房间,再走下一层,用队列实现 算法实现 阅读全文
摘要:
Source: PAT A1103 Integer Factorization (30 分) Description: The K−P factorization of a positive integer N is to write N as the sum of the P-th power o 阅读全文