#include <cstdio>
#include <cstring>
using namespace std;
int n;
const int N=100005;
char a[N];
int main (){
scanf("%d\n%s",&n,&a);
int len=strlen(a);
if(len<=n) puts(a);
else for(int i=0;i<n;i++)
printf("%c",a[i]);
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:8:22: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[100005]’ [-Wformat=]
scanf("%d\n%s",&n,&a);
^
./Main.cpp:8:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n%s",&n,&a);
^