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
+22
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
scanner.Split(bufio.ScanWords)
|
||||
total := new(big.Int)
|
||||
for scanner.Scan() {
|
||||
value, ok := new(big.Int).SetString(scanner.Text(), 10)
|
||||
if !ok {
|
||||
os.Exit(2)
|
||||
}
|
||||
total.Add(total, value)
|
||||
}
|
||||
fmt.Println(total)
|
||||
}
|
||||
Reference in new issue
Block a user