#include using namespace std; int N,K; pair,int> f(int n, int k, vector &S, int x){ if(n == k) return {S,x}; vector A={}; int now = 0; for(int i=0;i 1 && x == 1)); } int main(){ cin>>N>>K; vector S={}; for(int i=0;i>a; S.push_back(a-'0'); } vector T={}; int now = 1; for(int i=1;i,int> z = f(N,K,T,S[0]); int a; tie(S,a) = z; for(int i=0;i