找數
Submit solution
Points:
1
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Java 19, Java 8
題目說明
請產生一個array{1,3,5,2,10,32,12,26,70,67}, 排序後輸出到螢幕(由大排到小) 請使用者輸入要搜尋的值,你的程式將該數字在排序後array的索引數值列印在螢幕上(請勿用array.sort,搜尋不到請輸出-1)
sample input1
1
sample output1
9
sample input2
30
sample output2
-1
Comments
import java.util.*; public class h_3 {
}