codeforces/669B_gh.py
def calculate(self):
        """ Main calcualtion function of the class """

        result = "FINITE"
        pos = 0
        vis = set([])
        while 0 <= pos < self.n:
            vis.add(pos)
            if self.numa[pos]:
                pos += self.numb[pos]
            else:
                pos -= self.numb[pos]
            if pos in vis:
                result = "IN" + result
                break

        return str(result)
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = "FINITE"
        pos = 0
        vis = set([])
        while 0 <= pos < self.n:
            vis.add(pos)
            if self.numa[pos]:
                pos += self.numb[pos]
            else:
                pos -= self.numb[pos]
            if pos in vis:
                result = "IN" + result
                break
        return str(result)
def calculate ( self ) : result = "FINITE" pos = 0 vis = set ( [ ] ) while 0 <= pos < self . n : vis . add ( pos ) if self . numa [ pos ] : pos += self . numb [ pos ] else : pos -= self . numb [ pos ] if pos in vis : result = "IN" + result break return str ( result )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self