PAT乙级真题
Daimorpher
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1001 害死人不偿命的(3n+1)猜想 (15)(15 分)
#include<iostream>using namespace std;int main(){ int n, ans = 0; cin >> n; while (n != 1) { if (n % 2 == 0)n /= 2; else n = (3 * n + 1) / 2; ans++; } cout << ans; r...原创 2018-08-22 10:42:50 · 758 阅读 · 0 评论 -
1011 A+B和C (15)(15 分)
#include<iostream>typedef long long LL;LL a, b, c;int t;int main(){ scanf("%d", &t); for(int i=1;i<=t;i++) { printf("Case #%d: ", i); scanf("%lld%lld%lld", &a, &b, &原创 2018-08-22 10:49:10 · 290 阅读 · 0 评论 -
1016 部分A+B(15 分)
#include<iostream>#include<string>#include<cstring>using namespace std;string a, b;int da, db;typedef long long LL;LL getnum(string s, int d){ int ans = 0; for (int i = 0;...原创 2018-08-22 10:53:50 · 298 阅读 · 0 评论 -
1026 程序运行时间(15 分)
#include<iostream>#include<cmath>#include<algorithm>using namespace std;const int CLK_TCK = 100;int c1, c2;int main(){ scanf("%d%d", &c1, &c2); int t = round((c2 - ...原创 2018-08-22 10:58:54 · 558 阅读 · 0 评论 -
1046 划拳(15 分)
#include<iostream>#include<algorithm>using namespace std;int n;int main(){ scanf("%d", &n); int acount = 0, bcount = 0; while (n--) { int a, ax, b, bx; scanf("%d%d%d%d", ...原创 2018-08-22 11:04:37 · 432 阅读 · 0 评论 -
1008 数组元素循环右移问题 (20)(20 分)
#include<iostream>#include<algorithm>using namespace std;const int maxn = 1e4 + 10;int n, m;int a[maxn];int main(){ scanf("%d%d", &n, &m); for (int i = 0; i < n; i++)s...原创 2018-08-22 11:11:37 · 368 阅读 · 0 评论 -
1012 数字分类 (20)(20 分)
#include<iostream>#include<algorithm>#include<vector>using namespace std;int n, x;vector<int>a[6];int main(){ scanf("%d", &n); while (n--) { scanf("%d", &a原创 2018-08-22 11:21:41 · 427 阅读 · 0 评论 -
1018 锤子剪刀布(20 分)
#include<iostream>#include<algorithm>#include<map>using namespace std;char num[3] = { 'B','C','J' };int a[3], b[3];int n;int as, ap, af, bs, bp, bf;void show(int a[]){ int...原创 2018-08-22 11:39:21 · 731 阅读 · 0 评论
分享