随笔分类 -  PAT Basic Level

摘要:比赛链接:https://pintia.cn/market/item/1371703238093053952 7-1 打印三角形拼图 (15 分) 题解 找规律。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::s 阅读全文
posted @ 2021-03-17 00:31 Kanoon 阅读(342) 评论(0) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1336191032829964288 7-1 祖传好运 (15 分) 题解 递归判断即可。 代码 #include <bits/stdc++.h> using namespace std; bool ok(int x) { if 阅读全文
posted @ 2021-03-14 01:05 Kanoon 阅读(287) 评论(0) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1302816969611366400 7-1 多二了一点 (15分) 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int sum(string s) { int 阅读全文
posted @ 2020-09-08 17:40 Kanoon 阅读(819) 评论(7) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1287964475579875328 7-1 对称日 题解 模拟,注意年月日不足位在前面补零。 代码 #include <bits/stdc++.h> using namespace std; map<string, strin 阅读全文
posted @ 2020-07-28 20:30 Kanoon 阅读(464) 评论(0) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1097414703086837760 A - 检查密码 Tips 密码中可能有空格,所以需要用 getline() 。 代码 #include <bits/stdc++.h> using namespace std; void 阅读全文
posted @ 2020-07-15 13:00 Kanoon 阅读(274) 评论(0) 推荐(1)
摘要:比赛链接:https://pintia.cn/market/item/1103202531901689856 7-1 大美数 题解 模拟即可。 Tips 这题通过率只有 $0.09$,可能是大部分人搞错了整除的关系,$a$ 整除 $b$ 表示为 $b\ \%\ a = 0$ 。 代码 #includ 阅读全文
posted @ 2020-07-14 13:00 Kanoon 阅读(268) 评论(2) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1203557339918098432 7-1 2019数列 题解 简单的递推。 代码 #include <bits/stdc++.h> using namespace std; int main() { int f[1005] 阅读全文
posted @ 2020-07-11 12:10 Kanoon 阅读(243) 评论(0) 推荐(0)
摘要:比赛链接:https://pintia.cn/market/item/1170913498742468608 7-1 B是A的多少倍 题意 将一个数后 $d$ 位截下移到最高位前面,得到的新数是原数的多少倍。 代码 #include <bits/stdc++.h> using namespace s 阅读全文
posted @ 2020-07-10 16:45 Kanoon 阅读(204) 评论(0) 推荐(0)
摘要:题目链接:https://pintia.cn/problem-sets/994805260223102976/problems/994805320306507776 #include <bits/stdc++.h> using namespace std; int main() { int n; c 阅读全文
posted @ 2020-07-09 23:20 Kanoon 阅读(191) 评论(0) 推荐(0)
摘要:题目链接:https://pintia.cn/problem-sets/994805260223102976/problems/994805324509200384 #include <bits/stdc++.h> using namespace std; map<char, string> mp{ 阅读全文
posted @ 2020-07-08 22:30 Kanoon 阅读(112) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int cnt = 0; while (n != 1) { if (n & 1) n = (3 * n + 1) / 2; else n /= 2; 阅读全文
posted @ 2020-06-18 22:10 Kanoon 阅读(126) 评论(2) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); int cnt[26] = {}; for (char c : str) if (isalpha(c)) ++cnt[t 阅读全文
posted @ 2020-04-15 22:26 Kanoon 阅读(110) 评论(0) 推荐(0)