結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー lethe2211lethe2211
提出日時 2015-03-02 10:10:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 5,000 ms
コード長 717 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 6,628 KB
実行使用メモリ 6,584 KB
最終ジャッジ日時 2023-09-06 06:21:14
合計ジャッジ時間 897 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,428 KB
testcase_01 AC 11 ms
6,532 KB
testcase_02 AC 12 ms
6,536 KB
testcase_03 AC 12 ms
6,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        n = input()

        for i in range(1, n+1):
            ans = ''
            if i % 15 == 0:
                ans += 'FizzBuzz'
            elif i % 3 == 0:
                ans += 'Fizz'
            elif i % 5 == 0:
                ans += 'Buzz'
            else:
                ans += str(i)
            print ans
            
                
        
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()
0