# -*- coding: utf-8 -*-
"""
Created on Sat May  4 22:13:29 2019

n: Number of digits in the series
k: Max value of integers that can be used
j: Value of the last digit in the series

@author: Zhe
"""

#### Problem 1

n=4
k=4
j=2

(k-1)*(k-2)+1

#### Problem 2

n=4 
k=100 
j=1

(k-1)*(k-2)

#### Problem 3

n=100 
k=100
j=1

( (k-1)*(k-2)+1 ) * (n-1)

#### Problem 4

n=347
k=2281
j=829

(k-1)*(k-2)+1

#### Problem 5
n=1.26e6
k=4.17e6
j=1

(k-1)*(k-2)+1

#### Problem 6

n=10**7
k=10**12
j=829

(k-1)*(k-2)+1




