結果

問題 No.593 4進FizzBuzz
ユーザー 6soukiti296soukiti29
提出日時 2017-11-10 22:57:13
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 2,880 ms
コンパイル使用メモリ 68,040 KB
実行使用メモリ 10,712 KB
最終ジャッジ日時 2023-09-12 15:25:31
合計ジャッジ時間 7,137 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,384 KB
testcase_12 AC 1 ms
4,384 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,384 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 26 ms
10,180 KB
testcase_17 WA -
testcase_18 AC 26 ms
10,292 KB
testcase_19 AC 27 ms
10,376 KB
testcase_20 WA -
testcase_21 AC 26 ms
10,168 KB
testcase_22 AC 26 ms
10,712 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 27 ms
10,212 KB
testcase_27 AC 27 ms
10,348 KB
testcase_28 WA -
testcase_29 AC 27 ms
10,376 KB
testcase_30 AC 26 ms
10,152 KB
testcase_31 AC 26 ms
10,196 KB
testcase_32 AC 25 ms
10,196 KB
testcase_33 AC 27 ms
10,320 KB
testcase_34 AC 26 ms
10,324 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #

import sequtils,strutils
var
    S = stdin.readline
    ans : string = ""
    cnt : int
    
for c in S:
    cnt += c.ord - '0'.ord
    if cnt > 4:
        cnt -= 3
if cnt mod 3 == 0:
    ans &= "Fizz"

cnt = 0
for i,c in S:
    if i mod 2 == 0:
        cnt += c.ord - '0'.ord
    else:
        cnt -= c.ord - '0'.ord
if cnt == 0:
    ans &= "Buzz"

if ans == "":
    echo S
else:
    echo ans
0