![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat
一个月刷穿甲级pat题库
少年慢慢刷题
这个作者很懒,什么都没留下…
展开
-
字符串处理大整数加法的常用思路(乙级pat1074)
#include <iostream>using namespace std;int main(){ string s,s1,s2,ans; int carry=0,flag=0; cin>>s>>s1>>s2; ans =s; string ss1(s.length()-s1.length(),'0'...原创 2020-04-19 16:06:00 · 134 阅读 · 0 评论 -
乙级1064
#include <cstdio>#include <iostream>#include <algorithm>#include <set>using namespace std;//求得每一位数字之和int sum(int n){ int sum=0; while (n!=0){ sum +=n%10;...原创 2020-04-16 19:30:49 · 86 阅读 · 0 评论 -
乙级1066
#include <cstdio>#include<iostream>using namespace std;int main(){ int n,m,min,max,gray; cin>>m>>n>>min>>max>>gray; for (int i = 0; i <m ; ...原创 2020-04-16 19:29:19 · 91 阅读 · 0 评论 -
乙级pat1067
测试点2 之前用scanf(" ")过不去,必须用getchar()才可以过得去,说明测试点2密码中含有空格#include <string>#include <iostream>using namespace std;int main(){ string s; cin>>s; int n; cin>>n;...原创 2020-04-16 19:25:26 · 93 阅读 · 0 评论 -
乙级1049,浮点数相乘顺序影响精度
Ac的代码#include <cstdio>using namespace std;const int N=100010;double a[N];int main(){ int n; scanf("%d",&n); double v,ans=0; for (int i = 1; i <=n ; ++i) { sca...原创 2020-03-24 15:00:14 · 114 阅读 · 0 评论 -
1030乙级,完美数列
#include <cstdio>#include <algorithm>using namespace std;const int N=100010;long long a[N];bool cmp(long long a,long long b){ return a<b;}int main(){ int n; long lon...原创 2020-03-19 10:03:39 · 72 阅读 · 0 评论 -
甲级pat1013
#include <iostream>#include <cstdio>#include <vector>using namespace std;int N,M,K;int u,v;int visit[1000]={0};void DFS(vector<int>*G,int u){ visit[u]=1; for(int...原创 2019-07-11 22:06:38 · 57 阅读 · 0 评论 -
1010甲级进制转换
#include <cstdio>#include <cctype>#include <string>#include <algorithm>#include <cmath>#include <iostream>using namespace std;typedef long long ll;ll conve...原创 2020-03-19 10:00:16 · 107 阅读 · 0 评论