Submission #17687605


Source Code Expand

defmodule Main do
  def main do
    n = IO.read(:line) |> String.trim() |> String.to_integer()
    1..n |> Enum.reduce(0, fn i, acc -> if rem(i,3) == 0 or rem(i,5) == 0, do: acc, else: acc + i end) |> IO.puts()
  end
end

Submission Info

Submission Time
Task B - FizzBuzz Sum
User awesomey
Language Elixir (1.10.2)
Score 200
Code Size 225 Byte
Status AC
Exec Time 459 ms
Memory 30736 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 15
Set Name Test Cases
Sample sample_01, sample_02
All hand_01, hand_02, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, random_11, sample_01, sample_02
Case Name Status Exec Time Memory
hand_01 AC 451 ms 30656 KiB
hand_02 AC 395 ms 30480 KiB
random_01 AC 420 ms 30736 KiB
random_02 AC 459 ms 30604 KiB
random_03 AC 419 ms 30728 KiB
random_04 AC 422 ms 30648 KiB
random_05 AC 435 ms 30584 KiB
random_06 AC 391 ms 30596 KiB
random_07 AC 398 ms 30636 KiB
random_08 AC 402 ms 30600 KiB
random_09 AC 401 ms 30572 KiB
random_10 AC 403 ms 30612 KiB
random_11 AC 444 ms 30652 KiB
sample_01 AC 390 ms 30496 KiB
sample_02 AC 434 ms 30532 KiB