Submission #1832841
Source Code Expand
package main import ( "fmt" "bufio" "os" "strconv" ) // 標準入力(os.Stdin) var sc = bufio.NewScanner(os.Stdin) func main(){ // スペース区切りで文字を取り出す(bufio.ScanWords) sc.Split(bufio.ScanWords) n := nextInt() // 1つ目の数値 // 範囲値チェック if n < 1 { fmt.Println("Too small") os.Exit(0) } else if n > 9 { fmt.Println("Too big") os.Exit(0) } if (n % 3) == 0 { fmt.Println("YES") } else { fmt.Println("NO") } } func nextInt() int { sc.Scan() // 1行ずつ読み込む i, _ := strconv.Atoi(sc.Text()) // 読み込んだ文字を数値型へ変換 return i }
Submission Info
Submission Time | |
---|---|
Task | A - 世界のFizzBuzz |
User | yy18 |
Language | Go (1.6) |
Score | 100 |
Code Size | 722 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 640 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, sample_03.txt, test_1.txt, test_2.txt, test_3.txt, test_4.txt, test_5.txt, test_6.txt, test_7.txt, test_8.txt, test_9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 640 KB |
sample_02.txt | AC | 1 ms | 640 KB |
sample_03.txt | AC | 1 ms | 640 KB |
test_1.txt | AC | 1 ms | 640 KB |
test_2.txt | AC | 1 ms | 640 KB |
test_3.txt | AC | 1 ms | 640 KB |
test_4.txt | AC | 1 ms | 640 KB |
test_5.txt | AC | 1 ms | 640 KB |
test_6.txt | AC | 1 ms | 640 KB |
test_7.txt | AC | 1 ms | 640 KB |
test_8.txt | AC | 1 ms | 640 KB |
test_9.txt | AC | 1 ms | 640 KB |