大纲考察内容 数据存储结构:数组.链 基础算法:递归.排序.计算时间复杂度.空间复杂度.分析算法稳定性 1001.害死人不偿命的(3n+1)猜想 (15) https://www.patest.cn/contests/pat-b-practise/1001 #include <iostream> using namespace std; int main(){ int n , fre = 0; cin>>n; while (n != 1){ if (n%2 == 0){ n = n…
最近在尝试做acm试题,刚刚是1001题就把我困住了,这是题目: Problem Description In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. Input The input will consist of a series of integers n, one integer per line Output For each case, output SUM(n) in one…
原题连接:https://www.patest.cn/contests/pat-a-practise/1001 题目如下: 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 Each input fil…
我们生产服务器中的一个数据库发出监控告警日志的邮件,内容如下所示,在31号09:11分出现了大名鼎鼎的ORA-00600错误. Dear All: The Instance xxx' alert log occured the ora errors ,please see the detail blow and take action for it. many thanks! ----------------------------------------- The errors is blo…
Phone Number Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345, after pressing 123, we call A, and not…
两道水题,用来熟悉 HOJ 的提交系统. 1001:输入两个整数 A, B (0 <= A,B <= 10),输出 A+B. #include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b) { cout << (a + b) << endl; } return 0; } 成绩:时间 0.00s:内存 1260K:代码长度 241…