PAT 甲级
wvdon
先做好一件事,才能做好更多事
展开
-
A1058. A+B in Hogwarts (20)
If you are a fan of Harry Potter, you would know the world of magic has its own currency system — as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sic...原创 2020-04-05 17:37:20 · 136 阅读 · 0 评论 -
A1027 Colors in Mars (20分)
1027 Colors in Mars (20分)People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are...原创 2020-04-05 16:53:10 · 126 阅读 · 0 评论 -
A1019 General Palindromic Number (20分)
1019 General Palindromic Number (20分)A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single...原创 2020-04-05 16:29:59 · 97 阅读 · 0 评论 -
A1036 Boys vs Girls (25分)
1036 Boys vs Girls (25分)This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each in...原创 2020-04-03 20:54:43 · 148 阅读 · 0 评论 -
A1006 Sign In and Sign Out (25分)
1006 Sign In and Sign Out (25分)At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the record...原创 2020-04-01 23:51:20 · 161 阅读 · 0 评论 -
A1011 World Cup Betting (20分)
1011 World Cup Betting (20分)With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World C...原创 2020-04-01 23:33:13 · 201 阅读 · 0 评论 -
A1002 A+B for Polynomials (25分)
1002 A+B for Polynomials (25分)题意:多因数加法可以通过构造数组进行#include <stdio.h>int main(){ int n,m; double array[1010]={0}; scanf("%d",&n); while(n--!=0){ int x;double y; scanf("%d %lf",&...原创 2020-04-01 18:20:34 · 196 阅读 · 0 评论 -
A1009 Product of Polynomials (25分)
1009 Product of Polynomials (25分)题目地址Sample Input:2 1 2.4 0 3.22 2 1.5 1 0.5Sample Output:3 3 3.6 2 6.0 1 1.6题目大意多因数乘法可以构造,两个数组,或者,,,用一个数组然后用struct#include <stdio.h>int main(){ in...原创 2020-04-01 18:18:50 · 156 阅读 · 0 评论 -
A1065 A+B and C (64bit) (20分)
解析:a,b,c范围是[-263,263],而long long是 [-263,263-1],当相加大于范围时会溢出,变成负数。因此我们需要进行正负溢出判断。#include <stdio.h>int main(){ int n,tc=1; scanf("%d",&n); while(n--!=0){ long long a,b,c; scanf("%...原创 2020-03-27 22:37:44 · 146 阅读 · 0 评论 -
A1046 Shortest Distance (20分)
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contain...原创 2020-03-27 21:39:48 · 170 阅读 · 0 评论 -
A 1042 Shuffling Machine (20分)
题目1042 Shuffling Machine (20分)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where em...原创 2020-03-25 21:52:28 · 163 阅读 · 0 评论 -
A1059 Prime Factors (25分)
1059 Prime Factors (25分)分析题目大意:输入的数字进行分解,求其因子,并按其格式进行输出。解决方案:可知因子都必须为素数(不能再被除了),我们可以通过先求出公因子列表,然后从小到大不断对n进行连消;代码#include <stdio.h>const int maxn = 100010;bool pr[maxn] = {false}; int ...原创 2020-01-31 13:28:05 · 263 阅读 · 0 评论 -
A1025 PAT Ranking (25分)
1025 PAT Ranking (25分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several pla...原创 2020-01-28 15:46:43 · 217 阅读 · 0 评论 -
PAT-甲级-1025
1025 PAT Ranking (25 分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several pl...原创 2019-05-12 03:43:00 · 229 阅读 · 0 评论