随笔分类 -  刷题----PAT

摘要:原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805361586847744 8 3: 2 7 10 1: 4 2: 5 3 1: 4 1: 3 1: 4 4: 6 8 1 5 1: 4 3 4 3 1 题解:把 阅读全文
posted @ 2021-08-07 22:02 浅忆~ 阅读(45) 评论(0) 推荐(0)
摘要:原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805437411475456 6 5 2 3 1 5 6 12 2 2 4 1 5 5 6 3 1 1 5 6 7 题解:可以把题目转换为,最长不下降序列问题,但是 阅读全文
posted @ 2021-07-22 16:34 浅忆~ 阅读(32) 评论(0) 推荐(0)
摘要:原题链接:https://pintia.cn/problem-sets/994805260223102976/problems/994805298269634560 给定数字 0-9 各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意 0 不能做首位)。例如 阅读全文
posted @ 2021-07-19 09:25 浅忆~ 阅读(67) 评论(0) 推荐(0)
摘要:原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805523835109376 Sample Input: 5 6 0 21 2 1 5 30 1 10 2 20 3 11 2 12 4 13 4 1 Sample 阅读全文
posted @ 2021-07-17 21:48 浅忆~ 阅读(80) 评论(0) 推荐(0)
摘要:原题链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805526272000000 This time, you are supposed to find A+B where A and B are two polyn 阅读全文
posted @ 2021-07-17 19:33 浅忆~ 阅读(47) 评论(0) 推荐(0)
摘要:Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha 阅读全文
posted @ 2021-07-16 21:58 浅忆~ 阅读(33) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { string s="傻狗"; 7 for (float y=1.3;y>=-1.1;y-=0.06) 8 { 9 int index=0; 10 for(float x=-1.1;x<=1.1;x+=0.025) 11 ... 阅读全文
posted @ 2017-08-09 10:53 浅忆~ 阅读(116) 评论(0) 推荐(0)
摘要:1 /* 2 题目描述 3 4 有两个日期,求两个日期之间的天数,如果两个日期是连续的,则规定它们之间的天数为两天。 5 输入格式 6 7 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD 8 输入格式 9 10 每组数据输出一行,即日期差值 11 样例输入 12 13 20130101 14 20130105 15 样例输出 16 17 5 18... 阅读全文
posted @ 2017-08-09 10:52 浅忆~ 阅读(252) 评论(0) 推荐(0)
摘要:1 /* 2 题目描述 3 输入两个非负十进制整数A和B( 24 #include 25 using namespace std; 26 27 int main() 28 { int a,b,d; 29 scanf("%d%d%d",&a,&b,&d); 30 int sum=a+b; 31 int ans[31],num=0; //ans存放D进制... 阅读全文
posted @ 2017-08-09 10:50 浅忆~ 阅读(145) 评论(0) 推荐(0)
摘要:/* 题目描述 给定一个英语,要求编写程序,将句中所有单词按颠倒顺序输出 输入格式 测试输入包含一个测试用例,在一行内给出总长度不超过80的字符串。字符串由若干单 词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用1个 空格分开,输入保证句子末尾没有多余的空格。 输入格式 每个测试用例的输出展一行,出倒叙后的句子。 样例输入 Hello World Here I... 阅读全文
posted @ 2017-08-09 10:49 浅忆~ 阅读(282) 评论(0) 推荐(0)