結果

問題 No.593 4進FizzBuzz
ユーザー Konton7Konton7
提出日時 2020-05-25 22:48:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,871 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 14,764 KB
最終ジャッジ日時 2024-04-21 03:57:13
合計ジャッジ時間 37,026 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,624 KB
testcase_01 AC 32 ms
10,624 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 35 ms
10,880 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 30 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 31 ms
10,624 KB
testcase_10 AC 30 ms
10,624 KB
testcase_11 AC 30 ms
10,752 KB
testcase_12 AC 29 ms
10,752 KB
testcase_13 AC 30 ms
10,752 KB
testcase_14 AC 30 ms
10,752 KB
testcase_15 AC 30 ms
10,752 KB
testcase_16 AC 1,871 ms
14,448 KB
testcase_17 AC 1,839 ms
14,448 KB
testcase_18 AC 1,794 ms
14,448 KB
testcase_19 AC 1,801 ms
14,508 KB
testcase_20 AC 1,820 ms
14,580 KB
testcase_21 AC 1,826 ms
14,580 KB
testcase_22 AC 1,800 ms
14,632 KB
testcase_23 AC 1,800 ms
14,576 KB
testcase_24 AC 1,823 ms
14,580 KB
testcase_25 AC 1,773 ms
14,448 KB
testcase_26 AC 1,813 ms
14,708 KB
testcase_27 AC 1,768 ms
14,508 KB
testcase_28 AC 1,756 ms
14,448 KB
testcase_29 AC 1,870 ms
14,764 KB
testcase_30 AC 1,702 ms
14,448 KB
testcase_31 AC 1,715 ms
14,448 KB
testcase_32 AC 1,732 ms
14,452 KB
testcase_33 AC 1,869 ms
14,504 KB
testcase_34 AC 1,783 ms
14,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

ls = len(s)

s3 = 0
s5 = 0

for i in range(ls):
	s3 += int(s[i])
	s5 += int(s[i])
	s5 *= -1


ans = ""
if s3%3 == 0:
	ans += "Fizz"
if s5%5 == 0:
	ans += "Buzz"
if ans == "":
	ans = s
print(ans)
0