摘要:
#include <iostream> using namespace std; int main() { int T; cin >> T; while (T--) { int n; cin >> n; int startTimes[n]; // 用于存储每个学生开始结账的时间 int patien 阅读全文
posted @ 2023-11-25 13:31
卡布叻-空白
阅读(21)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; // 判断一个数是否是素数 bool isPrime(int num) { if (num < 2) { return false; // 数字小于2不是素数 } for (int i = 2; i * i <= nu 阅读全文
posted @ 2023-11-25 10:33
卡布叻-空白
阅读(28)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t--) { string code; cin >> code; int count[26] = {0 阅读全文
posted @ 2023-11-25 10:32
卡布叻-空白
阅读(11)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <algorithm> using namespace std; int main() { int T; cin >> T; while (T--) { int n; cin >> n; int l[n], r[n]; for (int i 阅读全文
posted @ 2023-11-25 10:26
卡布叻-空白
阅读(21)
评论(0)
推荐(0)
摘要:
题目介绍 有一个奇怪的国家,这个国家的气温计算方式比较奇特。 这个国家的可以预测明天的气温:预测方式为,对于某天的气温 \(n\) ,\(n\) 是一个给定的十进制正整数,那么下一天的气温将会是:用 \(2 ~ n-1\) 进制表示 \(n\) 时,每一个进制下所有位上的数字的和的平均数。 代码 & 阅读全文
posted @ 2023-11-25 08:33
卡布叻-空白
阅读(27)
评论(0)
推荐(0)
摘要:
题目介绍 小Z忘记了他的考号,但现在他已经拿到了所有人的考号和成绩,并且知道了他自己的排名,请帮他找出自己的信息。 一共 \(n\) 个人参赛,小Z是第 \(m\) 名。 题目 & 代码思路 首先,我们定义两个数组,一个存储学号,一个存储成绩。因为题目描述中已经给出了参赛人数的上限,我们可以根据最大 阅读全文
posted @ 2023-11-25 08:21
卡布叻-空白
阅读(21)
评论(0)
推荐(0)

浙公网安备 33010602011771号