█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 4572

Problema 0x78 - Suma de 2 números

  • Autor: josuedzp
  • Fecha: 2021-07-26 11:15:02 UTC (Hace más de 2 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 2
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/box/main.go:13 +0x19c
0.005 s 18 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 2
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/box/main.go:13 +0x19c
0.004 s 20 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 2
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/box/main.go:13 +0x19c
0.004 s 6 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 2
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/box/main.go:13 +0x19c
0.005 s 10 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 2
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/box/main.go:13 +0x19c
0.009 s 21 KBi
Puntos totales: 0 / 100

Código

package main

import (
  "fmt"
  "strings"
)

func main(){
  
  var numbers string
  fmt.Scanln(&numbers)
  split := strings.Split(numbers," ")
  fmt.Println(split[0] + split[1])
  
}