fork download
  1. package main
  2.  
  3. import (
  4. "bufio"
  5. "fmt"
  6. "os"
  7. )
  8.  
  9. func main() {
  10. reader := bufio.NewReader(os.Stdin)
  11. writer := bufio.NewWriter(os.Stdout)
  12. defer writer.Flush()
  13.  
  14. var array1 = make([][]int, 9)
  15. var maxNum int
  16. var idx [2]int
  17.  
  18. for i := 0; i < 9; i++ { // 9*9 행렬 입력
  19. array1[i] = make([]int, 9)
  20. for j := 0; j < 9; j++ {
  21. fmt.Fscan(reader, &array1[i][j])
  22. if maxNum < array1[i][j] {
  23. maxNum = array1[i][j]
  24. idx[0] = i + 1
  25. idx[1] = j + 1
  26. }
  27. }
  28. }
  29. fmt.Println(maxNum)
  30. fmt.Print(idx[0], idx[1])
  31. }
  32.  
Success #stdin #stdout 0s 5632KB
stdin
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
stdout
0
0 0