Created
June 14, 2020 10:38
-
-
Save yasukotelin/c9d99442644f6a3cc9a30d74a2d57c24 to your computer and use it in GitHub Desktop.
main.go for AtCorder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
) | |
var scanner = bufio.NewScanner(os.Stdin) | |
func main() { | |
var a, b int | |
fmt.Scanf("%d %d", &a, &b) | |
row := readline() | |
numbers := convStringsToInts(readline()) | |
} | |
func readline() string { | |
scanner.Scan() | |
return scanner.Text() | |
} | |
func convStringsToInts(strings []string) []int { | |
ints := make([]int, len(strings)) | |
for i, v := range strings { | |
num, _ := strconv.Atoi(v) | |
ints[i] = num | |
} | |
return ints | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment