+ 1
Help me! Daffodil number don't know where it is wrong
print("ę°“ä»č±ęø ļ¼ ") counter =0 for i in range(100,1000,1): hundred = int(i/100) ten = int(i/10%10) one = int(i%10) if i == hundred ** 3+ten**3+one**3: print(i,"ęÆę°“ä»č±ęø") counter = counter +1 print("100~999éå ±ę",counter,"åę°“ä»č±ęø")
3 Answers
+ 6
You need to include the following lines to support Chinese characters:
import sys, codecs
sys.stdout = codecs.getwriter('utf-16')(sys.stdout.buffer, 'strict')
+ 1
thank you for your answer
+ 1
You're welcome š