結果
問題 | No.3022 縛りFizzBuzz (Easy) |
ユーザー | kamokamokamone_ |
提出日時 | 2018-11-20 12:48:16 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 3,856 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-06 21:08:56 |
合計ジャッジ時間 | 941 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
10,880 KB |
testcase_01 | AC | 30 ms
10,624 KB |
testcase_02 | AC | 31 ms
10,624 KB |
testcase_03 | AC | 30 ms
10,752 KB |
ソースコード
import re fizzbuzz_vec = [ "a", "aa", "Fizz", "aaaa", "Buzz", "Fizz", "aaaaaaa", "aaaaaaaa", "Fizz", "Buzz", "aaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaa", "aaaaaaaaaaaaaa", "FizzBuzz", "aaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "Buzz", "aaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "FizzBuzz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "Buz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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "Buzz", ] fb_pattern = re.compile("Fizz|Buzz|FizzBuzz") for line in fizzbuzz_vec[:int(input())]: if fb_pattern.match(line): print(line) else: print(line.count("a"))