摘要: 最近很忙,可能要持续好几天 阅读全文
posted @ 2023-07-02 19:08 a_true 阅读(11) 评论(0) 推荐(0)
摘要: 1、了解了cmd的一些基础用法2、安装了Java的一些运用环境3、安装了JDK,notepad++,idea,成功编译了HelloWorld 4、学习了idea的用法,项目,模块,包,类5、了解并练习了Java的输入输出语句6、用c++写了一些pta的编程题目 阅读全文
posted @ 2023-07-01 00:26 a_true 阅读(11) 评论(0) 推荐(0)
摘要: 卡拉兹(Callatz)猜想: 对任何一个正整数 n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把 (3n+1) 砍掉一半。这样一直反复砍下去,最后一定在某一步得到 n=1。卡拉兹在 1950 年的世界数学家大会上公布了这个猜想,传说当时耶鲁大学师生齐动员,拼命想证明这个貌似很傻很天真的命题 阅读全文
posted @ 2023-05-26 22:30 a_true 阅读(56) 评论(0) 推荐(0)
摘要: L1-003 个位数统计 给定一个 k 位整数 N=dk−1​10k−1+⋯+d1​101+d0​ (0≤di​≤9, i=0,⋯,k−1, dk−1​>0),请编写程序统计每种不同的个位数字出现的次数。例如:给定 N=100311,则有 2 个 0,3 个 1,和 1 个 3。 输入格式: 每个输 阅读全文
posted @ 2023-05-25 23:21 a_true 阅读(47) 评论(0) 推荐(0)
摘要: 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 ***** *** * *** ***** 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号, 阅读全文
posted @ 2023-05-24 21:26 a_true 阅读(17) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std; template <typename T>class Node{public: Node(T data) : data(data), next(nullptr) { cout << "Node Constructor r 阅读全文
posted @ 2023-05-23 22:03 a_true 阅读(66) 评论(1) 推荐(0)
摘要: #include<iostream>#include<list>#include<algorithm>using namespace std;int main(){ int i,a[10],b; for(i=0; i<10; i++){ scanf("%d",&a[i]); } scanf("%d" 阅读全文
posted @ 2023-05-22 22:01 a_true 阅读(29) 评论(0) 推荐(0)
摘要: #include<iostream>#include<vector>#include<algorithm>using namespace std;int main(void){ int i,a[10],b; for(i=0; i<10; i++){ scanf("%d",&a[i]); } scan 阅读全文
posted @ 2023-05-19 21:59 a_true 阅读(65) 评论(0) 推荐(0)
摘要: #include <iostream>#include <string>using namespace std; template <class T>void sort(T *a, int size){ int r, i, j; for(i = 0; i < size; i++) cin >> a[ 阅读全文
posted @ 2023-05-18 19:37 a_true 阅读(135) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std; template <class T> class Absolute { private: T num; public: Absolute(T n) { num = n; } T getValue() const { if 阅读全文
posted @ 2023-05-17 22:43 a_true 阅读(46) 评论(0) 推荐(0)