当前位置:网站首页>It's the same type of question as just K above
It's the same type of question as just K above
2022-07-24 21:33:00 【A little Yu】
Title Description
It is known that nn It's an integer x_1,x_2,\cdots,x_nx1,x2,⋯,xn, as well as 11 It's an integer kk(k<nk<n). from nn Any number of integers kk Add the whole numbers , We can get a series of and respectively . For example, when n=4n=4,k=3k=3,44 The integers are 3,7,12,193,7,12,19 when , All the combinations and their sum can be obtained as :
3+7+12=223+7+12=22
3+7+19=293+7+19=29
7+12+19=387+12+19=38
3+12+19=343+12+19=34
Now? , Ask you to work out how many kinds of sum are prime numbers .
For example, the above example , There is only one sum of prime numbers :3+7+19=293+7+19=29.
Input format
The first line is an integer separated by two spaces n,kn,k(1 \le n \le 201≤n≤20,k<nk<n).
The second line nn It's an integer , Respectively x_1,x_2,\cdots,x_nx1,x2,⋯,xn(1 \le x_i \le 5\times 10^61≤xi≤5×106).
Output format
Output an integer , Indicates the number of species .
I/o sample
Input #1 Copy
4 3 3 7 12 19
Output #1 Copy
1
explain / Tips
【 Title source 】
NOIP 2002 Second question of popularization group
Just summarizing
边栏推荐
- How to design the order system in e-commerce projects? (supreme Collection Edition)
- rogabet note 1.1
- Baidu PaddlePaddle easydl helps improve the inspection efficiency of high-altitude photovoltaic power stations by 98%
- Thank Huawei for sharing the developer plan
- Go language pack management
- How does redis realize inventory deduction and prevent oversold? (glory Collection Edition)
- Drawing library Matplotlib drawing
- Evaluation of four operation expressions
- Information system project manager must recite the core examination site (47) project subcontract
- Baidu classic interview question - determine prime (how to optimize?)
猜你喜欢

ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘ (10061)

Alibaba cloud and parallel cloud launched the cloud XR platform to support the rapid landing of immersive experience applications

Use of cache in C #

Day5: three pointers describe a tree

About the acid of MySQL, there are thirty rounds of skirmishes with mvcc and interviewers
![[feature transformation] feature transformation is to ensure small information loss but high-quality prediction results.](/img/ad/6f5d97caa3f5163197ba435276a719.png)
[feature transformation] feature transformation is to ensure small information loss but high-quality prediction results.

Smarter! Airiot accelerates the upgrading of energy conservation and emission reduction in the coal industry

Ch single database data migration to read / write separation mode
![[record of question brushing] 16. The sum of the nearest three numbers](/img/b9/a78b72650e94c75ccbe22af1f43857.png)
[record of question brushing] 16. The sum of the nearest three numbers

Metauniverse: technological evolution, industrial ecology and big country game
随机推荐
Summary of yarn capacity scheduler
Press Ctrl to pop up a dialog box. How to close this dialog box?
OSI的体系结构,以及各层协议
A very useful log4net logging library
“IRuntime”: 未声明的标识符
C local functions and yield statements
Scientific computing toolkit SciPy Fourier transform
Leetcode 15. sum of three numbers
IO flow overview
[record of question brushing] 16. The sum of the nearest three numbers
Go language pack management
Drawing library Matplotlib styles and styles
Information System Project Manager - Chapter 10 project communication management and project stakeholder management
None of the most complete MySQL commands in history is applicable to work and interview (supreme Collection Edition)
【Pyspark基础】行转列和列转行(超多列时)
Dtable launched in the public beta, which is not only a table, but also a business application builder
[feature transformation] feature transformation is to ensure small information loss but high-quality prediction results.
CAD calls mobile command (COM interface)
Unity & facegood audio2face drives face blendshape with audio
Career development suggestions shared by ten CIOs