結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー maspy
提出日時 2020-01-09 23:48:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 1,000 ms
コード長 392 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-11-23 05:05:38
合計ジャッジ時間 2,307 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A = list(map(int, read().split()))

def f(n):
    bl3 = n%3 == 0
    bl5 = n%5 == 0
    if bl3 and bl5:
        return 'FizzBuzz'
    if bl3:
        return 'Fizz'
    if bl5:
        return 'Buzz'
    return str(n)

word = ''.join(map(f,A))

answer = len(word)
print(answer)
0