search 2d array


Submit solution

Points: 50 (partial)
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type
Allowed languages
Java 19, Java 8

題目說明

請先將以下值放入二維陣列 [1,3,5,7],[10,11,16,20],[21,30,34,60]
輸入一整數n,請回傳n在二維陣列中的位置
若n不在陣列裡則回傳 wrong!

輸入

整數n

輸出

n的位置(row, column)

sample input1

16

sample output1

1 2

sample input2

22

sample output2

wrong!

Comments

There are no comments at the moment.