AtCoder Beginner Contest 002

Submission #4651545

Source codeソースコード

fun readInt () = TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn

val SOME x = readInt ()
vel a = (x + 1) * 5000

val () = print (Int.toString a ^ "\n")

Submission

Task問題 A - 正直者
User nameユーザ名 ホスフィン
Created time投稿日時
Language言語 Standard ML (MLton 20100608)
Status状態 CE
Score得点 -
Source lengthソースコード長 165 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

Error: Main.sml 4.2.
Undefined variable vel.
Error: Main.sml 3.15.
Function not of arrow type.
function: [int option]
in: (readInt ()) vel
Error: Main.sml 4.6.
Undefined variable a.
Error: Main.sml 4.11.
Undefined variable x.
Error: Main.sml 3.6.
Pattern and expression disagree.
pattern: [??? option]
expression: [bool]
in: SOME x = readInt () vel a = (x + 1) * 5000
Error: Main.sml 6.31.
Undefined variable a.
Warning: Main.sml 3.2.
Unable to locally determine type of variable: x.
type: ???
in: val SOME x = readInt () vel a = (x + 1) * 5000
compilation aborted: parseAndElaborate reported errors

Test case