結果
| 問題 |
No.9010 うるう年判定
|
| ユーザー |
|
| 提出日時 | 2017-06-16 00:52:27 |
| 言語 | Elixir (1.18.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 154 bytes |
| コンパイル時間 | 5,118 ms |
| コンパイル使用メモリ | 58,648 KB |
| 最終ジャッジ日時 | 2024-11-14 20:04:03 |
| 合計ジャッジ時間 | 5,684 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、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
ソースコード
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