codeparrot/codecomplex huggingface dataset:
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
//package codeforces;
import java.util.*;
import java.math.BigInteger;
public class test_round_B {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		BigInteger k=sc.nextBigInteger();
		
		
		BigInteger i=new BigInteger("0");
		int d=0;
		
		BigInteger a=new BigInteger("0");
		while(i.compareTo(k)!=1)
		{
			if(i.compareTo(k)==0)
			{
				break;
			}
			else
			{
				d++;
				BigInteger temp=new BigInteger("0");
				for(int j=0;j<d;j++)
				{
					temp=temp.multiply(new BigInteger("10")).add(new BigInteger("9"));
				}
				i=i.add(new BigInteger(Integer.toString(d)).multiply(temp.subtract(a)));
				//i=i+d*(temp-a);
				a=temp;
			}
			
			
			
		}
		
		//System.out.println(a) ;
		BigInteger b=a.divide(new BigInteger("10"));
		BigInteger t=b;
		BigInteger l=t;
		//System.out.println(b);
		int dig=0;
	
		if(b.equals(new BigInteger("0")))
		{
			dig=0;
		}
		else
		{
			while(b.compareTo(new BigInteger("0"))==1)
			{
				dig++;
				b=b.divide(new BigInteger("10"));
			}
		}
		
		//System.out.println(dig);
		int flag=dig+1;
		BigInteger num=new BigInteger("0");
		b=t;
		while(b.compareTo(new BigInteger("0"))==1)
		{
			//System.out.println("sun");
			BigInteger rev=b.divide(new BigInteger("10"));
			num=num.add(new BigInteger(Integer.toString(dig)).multiply(b.subtract(rev)));
			//num+=(b-rev)*dig;
			b=b.divide(new BigInteger("10"));
			dig--;
			
		}
		//System.out.println(num);
		//System.out.println(t);
		BigInteger net=k.subtract(num);
		BigInteger div=net.divide(new BigInteger(Integer.toString(flag)));
		int q;
		if(net.mod(new BigInteger(Integer.toString(flag))).equals(new BigInteger("0")))
		{
			//System.out.println("s");
			//System.out.println();
			q=0;
			t=t.add(div);
			System.out.println(t.mod(new BigInteger("10")));
		}
		else
		{
			//System.out.println(div);
			//System.out.println(flag);
			//System.out.println(net);
			BigInteger r=div.multiply(new BigInteger(Integer.toString(flag)));
			r=net.subtract(r);
			//q=Integer.toString(net%flag).length();
			
			//System.out.println(q);
			//System.out.println(t);
			//System.out.println(pig);
			//System.out.println(w);
			t=t.add(div.add(new BigInteger("1")));
			//System.out.println(r);
			l=t;
			int pig=0;
			while(t.compareTo(new BigInteger("0"))==1)
			{
				pig++;
				t=t.divide(new BigInteger("10"));
			}
			//System.out.println(pig);
			BigInteger p=new BigInteger(Integer.toString(pig));
			BigInteger rem=p.subtract(r);
			//System.out.println(l);
			while(rem.compareTo(new BigInteger("0"))==1)
			{
				l=l.divide(new BigInteger("10"));
				rem=rem.subtract(new BigInteger("1"));
			}
			//System.out.println(l);
			//System.out.println(r);
			//System.out.println(c);
			//int f=t/w;
			//System.out.println(f);
			System.out.println(l.mod(new BigInteger("10")));
		}
		
		
		

	}

}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
    import java.util.Scanner;
     
    public class ABC {
        public static void main(String[] args){
     
            Scanner sc=new Scanner(System.in);
            long k,c,n,d;
            c=1;
            d=9;
            n=1;
            k= sc.nextLong();
            while(k>(c*d)) {
                k-=(c*d);
                n*=10;
                d*=10;
                c++;
            }
            n+=(k-1)/c;
            char[] num = String.valueOf(n).toCharArray();
            System.out.println(num[(int)((k-1)%c)]);
        }
     
    }
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.*;
import java.io.*;
import java.util.stream.Collectors;

public class P1177A {
    public static void main(String[] args) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        long n = Long.parseLong(r.readLine());
        if (n < 10) {
            System.out.print(n);
            return;
        }
        
        int len = 1;
        long edge = 10;
        long prev = 0;
        long prepow = 0;
        while (edge - 1 < n) {
            prepow = (long)Math.pow(10, len);
            long pow = prepow * 10;
            prev = edge;
            edge = edge + (pow - prepow) * (len + 1);
            len += 1;
        }

        long b = n - prev;
        long c = b / len;
        int rem = (int)(b % len);
        String s = Long.toString(prepow + c).charAt(rem) + "";

        System.out.print(s);
    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class DigitSeq {

	static class FastReader { 
		BufferedReader br; 
		StringTokenizer st; 

		public FastReader() 
		{ 
			br = new BufferedReader(new
					InputStreamReader(System.in)); 
		} 

		String next() 
		{ 
			while (st == null || !st.hasMoreElements()) 
			{ 
				try
				{ 
					st = new StringTokenizer(br.readLine()); 
				} 
				catch (IOException  e) 
				{ 
					e.printStackTrace(); 
				} 
			} 
			return st.nextToken(); 
		} 

		int nextInt() 
		{ 
			return Integer.parseInt(next()); 
		} 

		long nextLong() 
		{ 
			return Long.parseLong(next()); 
		} 

		double nextDouble() 
		{ 
			return Double.parseDouble(next()); 
		} 

		String nextLine() 
		{ 
			String str = ""; 
			try
			{ 
				str = br.readLine(); 
			} 
			catch (IOException e) 
			{ 
				e.printStackTrace(); 
			} 
			return str; 
		} 
	}

	public static void main(String[] args) {

		FastReader sc = new FastReader();
		OutputStream outputstream = System.out;
		PrintWriter out = new PrintWriter(outputstream);

		long n = sc.nextLong();
		long[] arr = new long[14];
		for(int i = 1; i <= 13; i++){
			arr[i] = (long)Math.pow(10, i)-(long)Math.pow(10, i-1);
		}
		long total = 0;
		for(int i = 1; i <= 13; i++){
			if(total+(long)i*arr[i]>=n){
				long ans = n-total;
				long rest = ans;
				if(ans%i!=0){
					ans /= i;
					ans++;
				} else {
					ans /= i;
				}
				ans += (long)Math.pow(10, i-1)-1;
				String str = Long.toString(ans);
				int ind = (rest%i==0) ? i-1 : (int)(rest%i)-1;
				out.println(str.charAt(ind));
				break;
			}
			total = total+(long)i*arr[i];
		}
		out.close();
	}

}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DD {
    public static void main(String args[]) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        long k=Long.parseLong(br.readLine());
        long ans=9*(int)Math.pow(10,0);
        int c=0;
        long start=0;
        while(k>ans) {
            c++;
            start=ans;
            ans+=9*(long)Math.pow(10,c)*(c+1);

        }
        long ms=(k-start-1)%(c+1);
        long a=(long)Math.pow(10,c)+(k-start-1)/(c+1);
        System.out.println((a+"").charAt((int)ms));
    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.*;
import java.io.*;
public class DigitSequence 
{
    public static PrintWriter out;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException 
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer token = new StringTokenizer("");
        String temp[] = br.readLine().split(" ");
        long pos = Long.parseLong(temp[0]);
        out = new PrintWriter(new BufferedOutputStream(System.out));
        if (pos<10)
        {
            out.println(pos);
        }
        else
        {
            out.println(findDigitSequence(pos));
        }
        out.close();
    }

    private static char findDigitSequence(long pos) 
    {
        //long result = 0;
        long min = 0;
        long max = 9;
        long dig = 1;
        while (pos>max)
        {
            dig++;
            min = max+1;
            max=(long) (max+9*Math.pow(10, dig-1)*dig);
        }
        pos = pos-min;
        long num = (long) (pos/dig+Math.pow(10, dig-1));
        String st = String.valueOf(num);
        if (dig==1)
        {
            return st.charAt(0);
        }
        char result = st.charAt((int) (pos%dig));
        return result;
    } 
    
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.*;
import java.util.*;
 
public class digits {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long k = Long.parseLong(br.readLine());
        long temp = 9 * (int)Math.pow(10,0);
        int count = 0;
        long initial = 0;
        while(k > temp) {
            count++;
            initial = temp;
            temp += 9 * (long)Math.pow(10,count)*(count+1);
        }
        long index = (k-initial-1)%(count+1);
        long num = (long)Math.pow(10,count) + (k-initial-1)/(count+1);
        System.out.println((num+"").charAt((int)index));
    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStreamReader;

public class B1177 {

	public static void main(String[] args) throws Exception {
//		BufferedReader br = new BufferedReader(new FileReader("F:/books/input.txt"));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Long n = Long.parseLong(br.readLine());
		long[] p = new long[15];
		int i;
		p[0]=1;
		for(i=1;i<15;p[i]=p[i-1]*10,i++);
		for(i=1;i*p[i-1]*9L<n;n-=i*p[i-1]*9L,i++);
		n--;
		int v = (int) (n%i);
		n/=i;
		n+=p[i-1];
		String s = n.toString();
		System.out.println(s.charAt(v));
	}

}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

	static final int MAX_N = 1000010;
	static final int INF = 0x3f3f3f3f;
	static final int mod = 1000000007;


	public static void main(String[] args) throws IOException {
		initReader(System.in);


//		int T = nextInt();
//		for (int i = 1; i <= T; i++)
			solve();

		pw.flush();
	}


	/*******************************************************************************************************************************/


	public static void solve() throws IOException {
		while (hasNext()) {
			long n = nextLong() - 1;

			long k = 1, x = 9;
			while (n - k * x >= 0) {
				n -= k * x;
				k += 1;
				x *= 10;
			}

			if (n == 0)
				pw.println(1);
			else {
				long num = x / 9 + n / k;
				String s = String.valueOf(num);
				pw.println(s.charAt((int) (n % k)));
			}
		}
	}




	/*******************************************************************************************************************************/

	static BufferedReader reader;
	static StringTokenizer tokenizer;
	static PrintWriter pw;

	public static void initReader(InputStream input) throws IOException {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

//		reader = new BufferedReader(new FileReader("ate.in"));
//		tokenizer = new StringTokenizer("");
//		printWriter = new PrintWriter(new BufferedWriter(new FileWriter("ate.out")));
	}

	public static boolean hasNext() {
		try {
			while (!tokenizer.hasMoreTokens()) {
				tokenizer = new StringTokenizer(reader.readLine());
			}
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public static String next() throws IOException {
		while (!tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

	public static String nextLine() {
		try {
			return reader.readLine();
		} catch (Exception e) {
			return null;
		}
	}

	public static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	public static long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	public static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	public static char nextChar() throws IOException {
		return next().charAt(0);
	}

	static class Pair {
		char first;
		boolean second;

		public Pair(char first, boolean second) {
			// TODO Auto-generated constructor stub

			this.first = first;
			this.second = second;
		}


		@Override
		public String toString() {
			// TODO Auto-generated method stub
			return "(" + this.first + ", " + this.second + ")";
		}
	}
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.*;
import java.util.*;
import java.math.*;

public class Main{
  final int mod = 1000000007;
  final int maxn = -1;
  final double eps = 1e-9;

  long digits(long n){
    if(n == 0) return 0;
    int p = (int)Math.log10(n);
    return (p + 1) * (n - (long)Math.pow(10, p) + 1) + digits((long)Math.pow(10, p) - 1);
  }

  void solve(){
    // freopen("in");
    String s = "";
    long k = nextLong();
    long i = 1;
    long j = k;
    while(i < j){
      long m = (i + j) / 2;
      if(digits(m) < k){
        i = m + 1;
      }
      else{
        j = m;
      }
    }
    if(digits(i) >= k) --i;
    printf("%c\n", String.valueOf(i + 1).charAt((int)(k - digits(i) - 1)));
  }

  final double pi = Math.acos(-1.0);
  final long infl = 0x3f3f3f3f3f3f3f3fl;
  final int inf = 0x3f3f3f3f;
  final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

  boolean zero(double x){ return x < eps; }

  /** io **/
  PrintWriter out;
  BufferedReader reader;
  StringTokenizer tokens;

  Main(){
    long s = System.currentTimeMillis();
    tokens = new StringTokenizer("");
    reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);
    out = new PrintWriter(System.out);
    Locale.setDefault(Locale.US);     // imprime double com ponto
    solve();
    out.close();
    debug("Time elapsed: %dms", System.currentTimeMillis() - s);
  }

  void freopen(String s){
    try{ reader = new BufferedReader(new InputStreamReader(new FileInputStream(s)), 1 << 15); }
    catch(FileNotFoundException e){ throw new RuntimeException(e); }
  }

  /** input -- supõe que não chegou no EOF **/
  int nextInt(){ return Integer.parseInt(next()); }
  long nextLong(){ return Long.parseLong(next()); }
  double nextDouble(){ return Double.parseDouble(next()); }

  String next(){ readTokens(); return tokens.nextToken(); }
  String nextLine(){ readTokens(); return tokens.nextToken("\n"); }

  boolean readTokens(){
    while(!tokens.hasMoreTokens()){             // lê os dados, ignorando linhas vazias
      try{
        String line = reader.readLine();
        if(line == null) return false;          // EOF
        tokens = new StringTokenizer(line);
      }
      catch(IOException e){ throw new RuntimeException(e); }
    }
    return true;
  }

  /** output **/
  void printf(String s, Object... o){ out.printf(s, o); }
  void debug(String s, Object... o){ if(!ONLINE_JUDGE) System.err.printf((char)27 + "[91m" + s + (char)27 + "[0m", o); }

  public static void main(String[] args){ new Main(); }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.Scanner;

public class prob1177b {
    public static void main(String[] args){

        Scanner sc=new Scanner(System.in);
        long k,c,n,d;
        c=1;
        d=9;
        n=1;
        k= sc.nextLong();
        while(k>(c*d)) {
            k-=(c*d);
            n*=10;
            d*=10;
            c++;
        }
        n+=(k-1)/c;
        char[] num = String.valueOf(n).toCharArray();
        System.out.println(num[(int)((k-1)%c)]);
    }

}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.Scanner;

public class Digits_Sequence_Hard_Edition_Kamel {
	public static void main(String [] args) {
		Scanner sc = new Scanner(System.in);
		long k = sc.nextLong();
		getResult(k);
		sc.close();
	}
	
	static void getResult(long k) {
		long val = 0;;
		long ten = 1;
		int i = 1;
		while(true) {
			val = 9l*ten*i;
			if(k<=val) {
				decompose(k, ten, i);
				System.exit(0);
			}
			else {
				k-=val;
				ten = ten*10l;
				i++;
			}
		}
	}
	
	static void decompose(long offset, long ten, int size) {
		long val = ten - 1 +(long) Math.ceil((double)offset/size);
		int digit = (int)(((offset%size))-1 + size)%size;
		
		String result = String.valueOf(val).substring(digit, digit+1);
		System.out.print(result);
	}
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long K = Long.valueOf(br.readLine());
        long n = 0;
        long k = 0; //len * Math.pow(10, len) * 0.9;
        long len = 0;
        while(true){
            len++;
            long preK = k;
            long preN = n;
            k += len * Math.pow(10, len) * 0.9;
            n += Math.pow(10, len) * 0.9;
            if(K < k) {
                k = preK;
                n = preN;
                break;
            }
        }
        long step = len - 1;
        while(true){
            while(k <= K){
                long preK = k;
                long preN = n;
                if(step == 0){
                    k += len;
                    n++;
                }else{
                    k += len * Math.pow(10, step) * 0.9;
                    n += Math.pow(10, step) * 0.9;
                }
                if(k == K || (k >= K && k - K < len)){
                    //System.out.println(k);
                    //System.out.println(n);
                    String nStr = Long.toString(n);
                    System.out.println(nStr.charAt(nStr.length() - (int)(k-K) - 1));
                    return;
                }
                if(K < k){
                    k = preK;
                    n = preN;
                    break;
                }
            }
            step--;
        }
    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.*;

public class Solution {
    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       long n = sc.nextLong();
       long itrIdx = 0;
       long itr = 0;
       long num = 0;
       while(itrIdx < n){
           itrIdx += (itr+1)*(Math.pow(10,itr+1) - Math.pow(10,itr));
           num+= (Math.pow(10,itr+1) - Math.pow(10,itr));
           itr++;
       }

        itrIdx -= itr*(Math.pow(10,itr)-Math.pow(10,itr-1));
        num -= (Math.pow(10,itr)-Math.pow(10,itr-1));
        long lastNum = num + ((n-itrIdx)/itr);
        long lastNumIndex = itrIdx + (itr* (lastNum-num));

        if(lastNumIndex == n){
            lastNumIndex = lastNumIndex-itr;
            lastNum -=1;
        }

        String nextNum = String.valueOf(lastNum+=1);
        System.out.println(nextNum.charAt((int) (n-lastNumIndex-1)));

    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.*;
import java.io.*;
 
public class Main {
	public static void main(String args[]) {new Main().run();}
	
	Scanner in = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	void run(){
	    work();
	    out.flush();
	}
	void work() {
	    long r=in.nextLong();
	    long b=0;
	    for(;;b++){
	        long num=9*(long)Math.pow(10,(double)b)*(b+1);
	        if(r-num<=0){
	            break;
	        }
	        r-=num;
	    }
	    long base=(long)Math.pow(10,(double)b);
	    long c=(r-1)/(b+1);
	    int m=(int)((r-1)%(b+1));
	    base+=c;
	    
	    String str=base+"";
	    out.println(str.charAt(m));
	}
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.util.*;

public class Solution {

    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       long n = sc.nextLong();
       long itrIdx = 0;
       long itr = 0;
       long num = 0;
       while(itrIdx < n){
           itrIdx += (itr+1)*(Math.pow(10,itr+1) - Math.pow(10,itr));
           num+= (Math.pow(10,itr+1) - Math.pow(10,itr));
           itr++;
       }

        itrIdx -= itr*(Math.pow(10,itr)-Math.pow(10,itr-1));
        num -= (Math.pow(10,itr)-Math.pow(10,itr-1));
        long lastNum = num + ((n-itrIdx)/itr);
        long lastNumIndex = itrIdx + (itr* (lastNum-num));

        if(lastNumIndex == n){
            lastNumIndex = lastNumIndex-itr;
            lastNum -=1;
        }

        String nextNum = String.valueOf(lastNum+=1);
        System.out.println(nextNum.charAt((int) (n-lastNumIndex-1)));

    }
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class Berland{
	
	public static void main(String[] args) throws NumberFormatException, IOException
	{
		new Berland().run();
	}
	
	public void run() throws NumberFormatException, IOException
	{
		BufferedReader file = new BufferedReader(new InputStreamReader(System.in));
		long N = Long.parseLong(file.readLine());
		long[] cutoff = new long[13];
		cutoff[0] = 0;
		for(int i = 1;i<=12;i++)
		{
			cutoff[i] = cutoff[i-1] + (long)(9*Math.pow(10,i-1))*i;
		}
		int dig = -1;
		for(int i = 0;i<12;i++)
		{
			if(cutoff[i]>=N)
			{
				dig = i;
				break;
			}
		}
		long sub = N - cutoff[dig-1]-1;
		long num = (sub)/dig;
		long number = (long)Math.pow(10,dig-1)+num;
		int pos = (int)(sub % dig);
		System.out.println((number+"").charAt(pos));
	}	
}
// Problem: 1177_B. Digits Sequence (Hard Edition)
// Time complexity: logn
// package name;
import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner s = new Scanner(System.in);
		long k = s.nextLong();
		
		long dp[] = new long[13];
		long x = 9; int i = 1;
		
		long ansx = 0; int ansi = 0;
		for(; i < 13; i++) {
			dp[i] = dp[i - 1] + x * i;
			x *= 10;
			if(k <= dp[i]) {
				ansx = x;
				ansi = i;
				break;
			}
			
			if(dp[i] > 1000000000000l) break;
		}
		
		if(ansi < 2) {
			System.out.println(k);
			return;
		}
		
		k -= dp[ansi - 1];
		
		//System.out.println(k);
		
		long st = (long)Math.pow(10, ansi - 1);
		
		long div = (k / ansi);
		if(k % ansi == 0) div--;
		
		k -= div * ansi;
		
		//System.out.println(k);
		System.out.println(findKthDigit(st + div, k));
		
	}

	private static Long findKthDigit(long xx, long k) {
		int z = (int) k;
		ArrayList<Long> arr = new ArrayList();
		while(xx > 0) {
			arr.add(xx % 10);
			xx /= 10;
		}
		return arr.get(arr.size() - z);
	}

}