
刷题
以梦为马,随处栖息
致知在格物,物格而后知至。
展开
-
PAT乙级题解1001-1005
文章目录1001 害死人不偿命的(3n+1)猜想1002 写出这个数1003 我要通过!1004 成绩排名1005 继续(3n+1)猜想1001 害死人不偿命的(3n+1)猜想将奇数情况转换为偶数,最后只对偶数做除二处理。#include<stdio.h>int main(){ int n, count = 0; scanf("%d",&n); ...原创 2019-07-16 00:00:42 · 258 阅读 · 0 评论 -
LeetCode 1.Two-Sum
Two SumDifficulty: EasyGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and y...原创 2019-06-27 23:04:29 · 148 阅读 · 0 评论 -
PAT乙级题解1006-1010
1006 换个格式输出整数首先判断输入数字的位数,然后分情况输出即可。#include<stdio.h>int main(){ int n; scanf("%d", &n); int signB, signS; signB = signS = 0; if (n >= 100) signB = signS ...原创 2019-07-16 00:01:36 · 202 阅读 · 0 评论