
PAT甲级
北城路人
红薯
展开
-
PAT——1005 Spell It Right (20分)
1005Spell It Right(20分)Given a non-negative integerN, your task is to compute the sum of all the digits ofN, and output every digit of the sum in English...原创 2020-04-18 22:18:29 · 105 阅读 · 0 评论 -
1007 Maximum Subsequence Sum (25 分)
//11:20 #include<iostream>#include<cstdio>#include<cstring>#include<string>using namespace std;const int MAXN =100100;int num[MAXN],allSum = -1,sum,first,last;int...原创 2019-02-15 16:31:47 · 88 阅读 · 0 评论 -
素数判断&&字符串与int转换 -----1152 Google Recruitment (20 分)
#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<sstream>using namespace std;const int MAXN =100010;int all[...原创 2019-02-15 14:58:06 · 190 阅读 · 0 评论 -
1050 String Subtraction (20 分)
1050 String Subtraction (20 分)Given two strings S1 and S2, S=S1−S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calcu...原创 2019-02-21 15:27:26 · 156 阅读 · 0 评论 -
1004 Counting Leaves (30 分)
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts...原创 2019-02-15 23:00:12 · 87 阅读 · 0 评论 -
1079 Total Sales of Supply Chain (25 分)
1079 Total Sales of Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starti...原创 2019-02-16 17:29:05 · 151 阅读 · 0 评论 -
PAT甲级—— 1001 A+B Format (20分)
1001 A+B Format (20分)Calculatea+band output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unles...原创 2020-04-18 18:15:05 · 150 阅读 · 0 评论