#include<stdio.h>#include<math.h>int main(){ int N,X,temp,rem,ara[20],i=1; scanf("%d %d",&X,&N); temp=X; while(temp!=0) { ara[i]=temp%10; temp=temp/10; i++; } printf("%d\n",ara[N]); return 0;}
No comments