自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 问答 (1)
  • 收藏
  • 关注

原创 PAT甲级-1046 Shortest Distance

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 contains one test case. For each case, the first line contains

2021-08-12 17:39:07 142

原创 PAT甲级-1042 Shuffling Machine

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 employees collaborate with gamblers by performing inadequate shuffles, many casinos employ

2021-08-12 17:06:52 135

原创 PAT甲级-1041 Be Unique

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10^4]. The first one who bets on a unique number wins. For example, if there are 7 people

2021-08-12 16:25:11 120

原创 PAT甲级-1035 Password

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) from O (o in uppercase). One

2021-08-12 16:07:45 165

原创 PAT甲级-1031 Hello World for U

Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed in the original order, starting top-down from the

2021-08-12 15:28:40 169

原创 PAT甲级-1027 Colors in Mars

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 for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The only

2021-08-12 15:04:05 184

原创 PAT甲级-1023 Have Fun with Numbers

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a diffe

2021-08-12 13:37:53 89

原创 PAT甲级-1019 General Palindromic Number

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 digit numbers are palindromic numbers.Although palindromic numbers are most often considered

2021-08-12 11:16:58 100

原创 PAT甲级-1015 Reversible Primes

A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two positive integers N(<10^5) and

2021-08-12 10:51:56 74

原创 PAT甲级-1011 World Cup Betting

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 Cup trophy in South Africa. Similarly, football betting fans were putting their money

2021-08-12 10:10:53 110

原创 PAT甲级-1008 Elevator

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to

2021-08-11 16:59:34 122

原创 PAT甲级-1005 Spell It Right

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each case occupies one line which contains an N (≤10^100).Ou

2021-08-11 16:29:42 194

原创 PAT甲级-1001 A+B Format

Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. Each case contains a pair of i

2021-08-11 15:57:23 86

原创 关于Java八种原始数据类型

关于Java六种原始数据类型Java六种原始数据类型int类型八进制十六进制浮点数类型布尔类型字符类型Java六种原始数据类型Java中的原始数据类型一共有六种,分别为byte(8bit)、short(16bit)、int(32bit)、long(64bit)、char(16位无符号整数)、float(32bit浮点数)、double(64bit浮点数)。他们每个类型的范围都是由其位数决定的,他们的范围就是负的2的(位数-1)次方到正的2的(位数-1)次方-1。int类型int类型有三种表示,八进

2021-02-26 13:54:05 2200

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除