# Path: kaidoku/misc.py
# def blank(s):
#     """Count numbers of blank cells."""
#     blank = 0
#     for i in range(81):
#         if s[i] == 0:
#             blank = blank + 1
#     return (blank)
# 
# Path: kaidoku/misc.py
# def cell(i):
#     """Address of the cell."""
#     return ('R' + str(i // 9 + 1) + 'C' + str(i % 9 + 1))


import copy
import datetime
from kaidoku.misc import blank
from kaidoku.misc import cell
    from kaidoku.calc import hidsing
    from kaidoku.calc import naksing
    from kaidoku.misc import check
    from kaidoku.calc import (solveone)
        for j in x[1:]:
            s2 = copy.deepcopy(s)
            p2 = copy.deepcopy(p)
            s2[i] = j
            p2[i] = [10]
            found = True
            minblank = blank(s2) - maxstep
            if minblank < 0:
                minblank = 0
            message2 = ''
            line = 1
            while found and blank(s2) > minblank:
                s2, p2, message3, found, err = scan(s2, p2, linescan, 4, b)
                message2 += '(' + str(line) + ') ' + message3 + '\n'
                line += 1
            bla += blank(s2)
            if err:
                message = ''
                if verbose > 1:
                    if verbose == 2:
                        message = 'Determine ' + cell(i) + ' by trial.'
                    else:
                        message = 'Trial. If ' + cell(i) + ' is ' + str(j) + \
                            ',\n' + message2.replace(
                            'This sudoku has no solution because', 'Contradiction:')
                p[i][j - 1] = 0
                s[i] = p[i].index(1) + 1
                step = message2.count('=')
                if verbose > 2:
                    message += 'Therefore ' + \

# Path: kaidoku/misc.py
# def blank(s):
#     """Count numbers of blank cells."""
#     blank = 0
#     for i in range(81):
#         if s[i] == 0:
#             blank = blank + 1
#     return (blank)
# 
# Path: kaidoku/misc.py
# def cell(i):
#     """Address of the cell."""
#     return ('R' + str(i // 9 + 1) + 'C' + str(i % 9 + 1))


# Path: kaidoku/search.py
import copy
import datetime
from kaidoku.misc import blank
from kaidoku.misc import cell
    from kaidoku.calc import hidsing
    from kaidoku.calc import naksing
    from kaidoku.misc import check
    from kaidoku.calc import (solveone)

        for j in x[1:]:
            s2 = copy.deepcopy(s)
            p2 = copy.deepcopy(p)
            s2[i] = j
            p2[i] = [10]
            found = True
            minblank = blank(s2) - maxstep
            if minblank < 0:
                minblank = 0
            message2 = ''
            line = 1
            while found and blank(s2) > minblank:
                s2, p2, message3, found, err = scan(s2, p2, linescan, 4, b)
                message2 += '(' + str(line) + ') ' + message3 + '\n'
                line += 1
            bla += blank(s2)
            if err:
                message = ''
                if verbose > 1:
                    if verbose == 2:
                        message = 'Determine ' + cell(i) + ' by trial.'
                    else:
                        message = 'Trial. If ' + cell(i) + ' is ' + str(j) + \
                            ',\n' + message2.replace(
                            'This sudoku has no solution because', 'Contradiction:')
                p[i][j - 1] = 0
                s[i] = p[i].index(1) + 1
                step = message2.count('=')
                if verbose > 2:
                    message += 'Therefore ' + \

                        cell(i) + ' is ' + str(s[i]) + '.'