fork download
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main(){
  6. var n int
  7. fmt.Scanf("%d", &n)
  8.  
  9. gap := make([]int, n)
  10. req := make([]string, n)
  11.  
  12. for i := 0; i < n; i++ {
  13. fmt.Scanf("%d %s", &gap[i], &req[i])
  14. }
  15.  
  16. fmt.Println(gap, req)
  17. }
Success #stdin #stdout 0s 5284KB
stdin
3
2 abacadaeafag
2 aaabcc
2 aaabccc
stdout
[2 2 2] [abacadaeafag aaabcc aaabccc]