Q

백준 27866

백준 27866번 문제


C code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <string.h>

int main(void)
{
char s[1001] = "";
int i = 0;

scanf("%s %d", s, &i);

if(i < 1 && i > strlen(s))
return 0;

printf("%c", s[i-1]);

return 0;
}