結果
問題 | No.3022 縛りFizzBuzz (Easy) |
ユーザー | maspy |
提出日時 | 2020-03-22 13:24:51 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 385 ms |
コンパイル使用メモリ | 10,596 KB |
実行使用メモリ | 7,900 KB |
最終ジャッジ日時 | 2023-08-26 03:42:21 |
合計ジャッジ時間 | 1,524 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,832 KB |
testcase_01 | AC | 15 ms
7,844 KB |
testcase_02 | AC | 15 ms
7,900 KB |
testcase_03 | AC | 16 ms
7,796 KB |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) one = N // N zero = one - one two = one + one three = two + one five = two + three for i in range(one, N + one): if i % (three * five) == zero: print('FizzBuzz') elif i % three == zero: print('Fizz') elif i % five == zero: print('Buzz') else: print(i)