mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-26 21:12:01 +00:00
24 lines
279 B
C++
24 lines
279 B
C++
|
#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;
|
||
|
}
|