码迷,mamicode.com
首页 >  
搜索关键字:pat    ( 13517个结果
PAT L1-039 古风排版
https://pintia.cn/problem-sets/994805046380707840/problems/994805091888906240 中国的古人写文字,是从右向左竖向排版的。本题就请你编写程序,把一段文字按古风排版。 输入格式: 输入在第一行给出一个正整数N(<100),是每一 ...
分类:其他好文   时间:2018-08-18 22:27:19    阅读次数:180
PAT L2-028 秀恩爱分得快
https://pintia.cn/problem-sets/994805046380707840/problems/994805054698012672 古人云:秀恩爱,分得快。 互联网上每天都有大量人发布大量照片,我们通过分析这些照片,可以分析人与人之间的亲密度。如果一张照片上出现了 K 个人, ...
分类:其他好文   时间:2018-08-18 22:26:39    阅读次数:235
字符串加双引号""与不加的区别
加双引号"",表示精确匹配 不加双引号"", 表示通配符 =~ 左侧字符串是否能够被右侧的PATTERN所匹配(注意: 此表达式一般用于[[ ]]中;扩展的正则表达式) ...
分类:其他好文   时间:2018-08-18 22:24:05    阅读次数:1147
【PAT】B1010 一元多项式求导(25 分)
``` include include using namespace std; struct duo{ int xishu,zhishu; }M; int main(){ vector arr; while(scanf("%d %d",&M.xishu,&M.zhishu)!=EOF){ M.xi ...
分类:其他好文   时间:2018-08-18 19:49:51    阅读次数:145
【PAT】B1016 部分A+B(15 分)
``` include using namespace std; int main(){ char A[20],DA,B[20],DB; int AA=0,BB=0; scanf("%s %c %s %c",A,&DA,B,&DB); char p=A;int pa=0,pb=0; while( p ...
分类:其他好文   时间:2018-08-18 19:49:08    阅读次数:183
【PAT】B1013 数素数(20 分)
``` include using namespace std; int main(){ int N,M;scanf("%d %d",&M,&N); int pnum=0,num=0; bool hashtable[1000000]={0}; for(int i=2;i=M&&pnum ...
分类:其他好文   时间:2018-08-18 19:48:52    阅读次数:202
【PAT】B1023 组个最小数(20 分)
``` include include using namespace std; struct number{ int numm; int number; }num[10]; bool cmp(struct number a,struct number b){ return a.numm ...
分类:其他好文   时间:2018-08-18 19:47:47    阅读次数:245
【PAT】B1011 A+B和C(15 分)
``` #include int main() { int n; scanf("%d",&n); for(int i=1;iC) printf("Case #%ld: true\n",i); else printf("Case #%ld: false\n",i); } return 0; } ... ...
分类:其他好文   时间:2018-08-18 19:46:58    阅读次数:104
【PAT】B1002 写出这个数 (20)(20 分)
``` #include #include #include int main() { char str[100],*p = str; gets(str); //scanf("%s", str); int num=0; while ((*p)!='\0') { num += (int)(*p)-48... ...
分类:其他好文   时间:2018-08-18 19:46:19    阅读次数:252
【PAT】B1007 素数对猜想(20 分)
``` / 1007 ??êy??2??? / include const int maxn = 10000001; int prime[maxn]={0}; bool p[maxn] = {0}; int pnum =0; void Find_prime(int n) { for(int i=2; ...
分类:其他好文   时间:2018-08-18 19:44:29    阅读次数:144
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!