<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution : <EOL> def isHappy ( self , n ) : <EOL> """<STR_LIT>""" <EOL> nxt = <NUM_LIT:0> <EOL> appeared = set ( ) <EOL> while True : <EOL> nxt += ( n % <NUM_LIT:10> ) * ( n % <NUM_LIT:10> ) <EOL> n /= <NUM_LIT:10> <EOL> if n == <NUM_LIT:0> : <EOL> if nxt == <NUM_LIT:1> : <EOL> return True <EOL> if nxt in appeared : <EOL> return False <EOL> appeared . add ( nxt ) <EOL> n = nxt <EOL> nxt = <NUM_LIT:0> </s>
