結果

問題 No.682 Average
ユーザー wotsushiwotsushi
提出日時 2018-07-25 22:38:27
言語 Elixir
(1.16.2)
結果
AC  
実行時間 633 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 1,114 ms
コンパイル使用メモリ 55,164 KB
実行使用メモリ 50,040 KB
最終ジャッジ日時 2023-08-29 22:46:51
合計ジャッジ時間 10,771 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 602 ms
49,008 KB
testcase_01 AC 587 ms
49,440 KB
testcase_02 AC 595 ms
49,784 KB
testcase_03 AC 600 ms
49,176 KB
testcase_04 AC 605 ms
49,232 KB
testcase_05 AC 628 ms
49,568 KB
testcase_06 AC 627 ms
49,300 KB
testcase_07 AC 627 ms
49,272 KB
testcase_08 AC 633 ms
49,824 KB
testcase_09 AC 626 ms
49,100 KB
testcase_10 AC 619 ms
49,812 KB
testcase_11 AC 632 ms
49,788 KB
testcase_12 AC 632 ms
50,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    [a, b] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1)

    ans = a..b |> Enum.count(&(rem(a + b + &1, 3) == 0))

    IO.puts ans
  end
end
0