結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー yozayoza
提出日時 2016-12-10 16:18:26
言語 Vim script
(v9.1)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 402 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 7,108 KB
実行使用メモリ 5,696 KB
最終ジャッジ日時 2023-08-19 09:29:34
合計ジャッジ時間 969 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,620 KB
testcase_01 AC 3 ms
5,696 KB
testcase_02 AC 3 ms
5,636 KB
testcase_03 AC 4 ms
5,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function! s:main(input) abort
  let result = []

  for i in range(1, a:input[0])
    if i % 15 == 0
      call add(result, 'FizzBuzz')
    elseif i % 5 == 0
      call add(result, 'Buzz')
    elseif i % 3 == 0
      call add(result, 'Fizz')
    else
      call add(result, i)
    endif
  endfor

  return join(result, "\n")
endfunction

let s:input = getline(1, '$')
enew
put =s:main(s:input)
2,$print
0