mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 13:56:26 +00:00
812. 打印数字
https://www.acwing.com/problem/content/submission/code_detail/14063815/
This commit is contained in:
parent
b0af2af171
commit
9e8c61ff42
23
AcWing/812/812.cpp
Normal file
23
AcWing/812/812.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
const char endl = '\n';
|
||||
|
||||
int n, k, x;
|
||||
|
||||
int main() {
|
||||
std::ios::sync_with_stdio(false);
|
||||
|
||||
cin >> n >> k;
|
||||
|
||||
while (n--) {
|
||||
cin >> x;
|
||||
|
||||
if (k--) cout << x << ' ';
|
||||
}
|
||||
|
||||
cout << endl;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user