feat(runner): compile Go and check answers per test group
This commit is contained in:
1 parent
e95c681165
commit
afee564bf4
61 files changed
+2592
-143
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
scanner.Split(bufio.ScanWords)
|
||||
var total, count float64
|
||||
for scanner.Scan() {
|
||||
value, err := strconv.ParseFloat(scanner.Text(), 64)
|
||||
if err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
total += value
|
||||
count++
|
||||
}
|
||||
fmt.Printf("%.9f\n", total/count)
|
||||
}
|
||||
Reference in new issue
Block a user