PAT
AGC-TREE
这个作者很懒,什么都没留下…
展开
-
[Java]PAT1001 A+B Format (20 分) Java
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. Each case contains a pair o原创 2021-01-03 12:17:59 · 119 阅读 · 0 评论 -
B1001害死人不偿命的3n+1猜想
1001 害死人不偿命的(3n+1)猜想 (15 分)卡拉兹(Callatz)猜想:对任何一个正整数 n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把 (3n+1) 砍掉一半。这样一直反复砍下去,最后一定在某一步得到 n=1。卡拉兹在 1950 年的世界数学家大会上公布了这个猜想,传说当时耶鲁大学师生齐动员,拼命想证明这个貌似很傻很天真的命题,结果闹得学生们无心学业,一心只证 (3...原创 2019-01-04 21:44:26 · 165 阅读 · 0 评论 -
B1011
1011 A+B 和 C (15 分)给定区间 [−231,231] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C。输入格式:输入第 1 行给出正整数 T (≤10),是测试用例的个数。随后给出 T 组测试用例,每组占一行,顺序给出 A、B 和 C。整数间以空格分隔。输出格式:对每组测试用例,在一行中输出 Case #X: true 如果 A+B&...原创 2019-01-05 20:19:04 · 206 阅读 · 0 评论