#include <iostream>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int c[n];
for(int i=0;i<n;i++){
cin>>c[i];
}
int h;
int f=0;
for(int i=0;i<n;i++){
h=c[i];
if(h==c[i]){
f++;
}
if(f==k){
cout<<"1"<<endl<<h;
break;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Incorrect |
0 ms |
204 KB |
Sequence doesn't repeat k times |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Sequence doesn't repeat k times |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Incorrect |
0 ms |
204 KB |
Sequence doesn't repeat k times |
4 |
Halted |
0 ms |
0 KB |
- |