結果

問題 No.9010 うるう年判定
ユーザー 👑 yumechiyumechi
提出日時 2017-06-16 00:52:27
言語 Elixir
(1.16.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 154 bytes
コンパイル時間 1,717 ms
コンパイル使用メモリ 59,892 KB
最終ジャッジ日時 2024-04-27 02:26:41
合計ジャッジ時間 2,075 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
== Compilation error in file Main.exs ==
** (FunctionClauseError) no function clause matching in Integer.parse/2    
    
    The following arguments were given to Integer.parse/2:
    
        # 1
        :eof
    
        # 2
        10
    
    Attempted function clauses (showing 2 out of 2):
    
        def parse(+_binary+, +base+) when -not (is_integer(base) and (base >= 2 and base <= 36))-
        def parse(+binary+, +base+) when -is_binary(binary)-
    
    (elixir 1.16.2) lib/integer.ex:275: Integer.parse/2
    Main.exs:1: (file)
    (elixir 1.16.2) lib/kernel/parallel_compiler.ex:428: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/8

ソースコード

diff #

x = IO.gets("") |> Integer.parse |> elem(0)
if rem(x, 400) === 0 || (rem(x, 100) !== 0 && rem(x, 4) === 0) do
    IO.puts "Yes"
else 
    IO.puts "No"
end
0