自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

克拉拉的博客

个人LEETCODE\PAT\OJ算法题解,知识见解

  • 博客(14)
  • 收藏
  • 关注

原创 PAT.A1060 Are They Equal

If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*10^5^ with simple chopping. Now given the number of signifi...

2018-06-30 03:06:15 96

原创 PAT.A1063 Set Similarity

Given two sets of integers, the similarity of the sets is defined to be N~c~/N~t~*100%, where N~c~ is the number of distinct common numbers shared by the two sets, and N~t~ is the total number of dist...

2018-06-27 01:23:54 73

原创 PAT.A1047 Student List for Course

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Speci...

2018-06-26 06:45:07 188 1

原创 PAT.A1039 Course List for Student

Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes ...

2018-06-24 08:34:36 86

原创 PAT.A1024 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...

2018-06-20 03:28:43 115

原创 PAT.A1023 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 con...

2018-06-19 21:26:24 101

原创 PAT.B1017 A除以B

本题要求计算A/B,其中A是不超过1000位的正整数,B是1位正整数。你需要输出商数Q和余数R,使得A = B * Q + R成立。输入格式:输入在1行中依次给出A和B,中间以1空格分隔。输出格式:在1行中依次输出Q和R,中间以1空格分隔。输入样例:123456789050987654321 7输出样例:17636684150141093474 3#include<cstdio>#...

2018-06-19 20:59:41 93

原创 PAT.A1096 Consecutive Factors

Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now given ...

2018-06-19 17:41:27 81

原创 PAT.A1059 Prime Factors

Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p~1~\^k~1~ * p~2~\^k~2~ *…*p~m~\^k~m~.Input Specification:Each input file contains one...

2018-06-18 05:04:05 155

原创 PAT.A1078 Hashing

The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be "H(key) = key %...

2018-06-17 03:06:02 98

原创 PAT.A1015 Reversible Primes (20)

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 pr...

2018-06-11 03:32:48 77

原创 PAT.1007 素数对猜想 (20)

让我们定义 d~n~ 为:d~n~ = p~n+1~ - p~n~,其中 p~i~ 是第i个素数。显然有 d~1~=1 且对于n&gt1有 d~n~ 是偶数。“素数对猜想”认为“存在无穷多对相邻且差为2的素数”。现给定任意正整数N (< 10^5^),请计算不超过N的满足猜想的素数对的个数。输入格式:每个测试输入包含1个测试用例,给出正整数N。输出格式:每个测试用例的输出占一行,不超...

2018-06-11 01:40:48 80

原创 PAT.B1013 数素数 (20)

令P~i~表示第i个素数。现任给两个正整数M <= N <= 10^4^,请输出P~M~到P~N~的所有素数。输入格式:输入在一行中给出M和N,其间以空格分隔。输出格式:输出从P~M~到P~N~的所有素数,每10个数字占1行,其间以空格分隔,但行末不得有多余空格。输入样例:5 27输出样例:11 13 17 19 23 29 31 37 41 4347 53 59 61 67 71...

2018-06-11 01:21:10 222

原创 PAT.A1088 Rational Arithmetic (20)

For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification:Each input file contains one test case,...

2018-06-11 00:21:06 121

空空如也

空空如也

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

TA关注的人

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