n = 1000while n > 0: print(n, end=', ') n = n // 2 # n //= 2 と書いてもよいprint() # 改行のみ出力する
Standard input is empty
1000, 500, 250, 125, 62, 31, 15, 7, 3, 1,
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!