05 2020 档案
PAT基础级 7-23币值转换(20分)
摘要:需要注意的几个点: 末尾的0不读 中间有多个0时,只读一个0 如果数字大于万,万位一定要读 我感觉我的代码存在一点问题,但是竟然AK了(神奇!!!∑(゚Д゚ノ)ノ) 去查了查,网上有的说100000001的大写是一亿万零一!!(就是我的代码结果,也是我觉得有问题的地方)是的,你没看错!不是一亿零一, 阅读全文
posted @ 2020-05-13 21:48 六九八 阅读(386) 评论(0) 推荐(0)
题解 双指针
摘要:1.Remove Nth Node From End of List (https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/) 刚看到题目的想法是使用两次遍历,第一次确定该链表的长度,再减去n,进行第二次遍历,从而删除对 阅读全文
posted @ 2020-05-09 23:22 六九八 阅读(108) 评论(0) 推荐(0)
PAT数据结构 03-树2 List Leaves
摘要:Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. Input Specification: Each input file contains one t 阅读全文
posted @ 2020-05-09 14:42 六九八 阅读(189) 评论(0) 推荐(1)
PAT数据结构 02-线性结构4 Pop Sequence
摘要:题目内容: Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a g 阅读全文
posted @ 2020-05-08 10:24 六九八 阅读(139) 评论(0) 推荐(0)
PAT基础级 函数题(部分)
摘要:6-2多项式求值问题 1 double f( int n, double a[], double x ){ 2 double ans=0; 3 // ans=a[0]; 4 for(int i=n;i>0;i--){ 5 ans=ans*x+a[i]*x; 6 } 7 // ans=ans*x; 8 阅读全文
posted @ 2020-05-04 17:17 六九八 阅读(272) 评论(0) 推荐(0)