臭咸鱼的缺氧瓶

快给我氧气!


  • Home

  • Tags

  • Categories

  • Archives

  • Search

PAT乙级1023

Posted on 2019-08-06 | | Visitors:
Words count in article: 320 字 | Reading time ≈ 1 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805298269634560 题解主要就是控制首位不能为0,其他的都很简单,就遍历然后往尾部加数字就好了。 12345678910111213141516171819 ...
Read more »

PAT乙级1022

Posted on 2019-08-06 | | Visitors:
Words count in article: 276 字 | Reading time ≈ 1 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805299301433344 题解很简单,参考十进制转二进制的方法,除二取余至商为0。 这里要注意:需要处理a+b等于0的情况(参考了https://blog.csd ...
Read more »

PAT乙级1021

Posted on 2019-08-06 | | Visitors:
Words count in article: 210 字 | Reading time ≈ 1 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805300404535296 题解很简单,用string保存这个数字,用一个数组保存各数字出现的次数,然后遍历字符串统计各数字个数,最后按照格式输出各位数字的个数。 ...
Read more »

PAT乙级1020

Posted on 2019-08-06 | | Visitors:
Words count in article: 406 字 | Reading time ≈ 2 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805301562163200 题解很容易看出这是个背包(非01背包)问题,直接用贪心求解即可。 需要注意的是,这里涉及到单价的计算,要注意整数计算会损失精度的问题,所 ...
Read more »

PAT乙级1019

Posted on 2019-08-06 | | Visitors:
Words count in article: 351 字 | Reading time ≈ 2 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805302786899968 题解根据用户输入或者每次的计算结果,生成大数和小数,然后输出计算过程,一直循环该过程;当结果为0或6174时,循环终止。 刚开始我有一个 ...
Read more »

PAT乙级1018

Posted on 2019-08-05 | | Visitors:
Words count in article: 450 字 | Reading time ≈ 2 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805304020025344 题解刚开始做很懵逼,可能并不难吧,但就是感觉做出来的话代码会很不优雅,所以想了半天。 然后把这个题放了会儿,有了思路。现在第3个测试点没 ...
Read more »

PAT乙级1016

Posted on 2019-08-05 | | Visitors:
Words count in article: 192 字 | Reading time ≈ 1 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805306310115328 题解很简单,遍历两个字符串,找到da或db,然后不断更新pa和pb即可。 1234567891011121314151617181920 ...
Read more »

PAT乙级1015

Posted on 2019-08-05 | | Visitors:
Words count in article: 524 字 | Reading time ≈ 3 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805307551629312 题解思路比较简单,核心就是定义一个学生的排序规则:将考生分为4类(德和才分数都低于L的直接淘汰),先比较考生的类型,再比较分数或者准考证 ...
Read more »

PAT乙级1014

Posted on 2019-08-05 | | Visitors:
Words count in article: 976 字 | Reading time ≈ 5 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805308755394560 题解一(部分正确)这是我的方法,第2个测试点没有过,和正确的代码比较,目前没比较出来错误,可能是我map用错了? 需要注意的点: 第一 ...
Read more »

PAT乙级1013

Posted on 2019-08-05 | | Visitors:
Words count in article: 305 字 | Reading time ≈ 2 分
题目链接https://pintia.cn/problem-sets/994805260223102976/problems/994805309963354112 题解一从第一个素数开始找起,输出$P_M$至$P_N$即可 12345678910111213141516171819202122232 ...
Read more »
1…212223…32
臭咸鱼

臭咸鱼

祝你天天开心啊!

316 posts
182 tags
RSS
Links
  • Road Wide's Blog
  • Chou Xianyu's CNBlog
© 2018 — 2021 臭咸鱼 | Site words total count: 289.4k
Powered by Hexo
|
Theme — NexT.Gemini v5.1.4
本站总访问量 次