show rank
Submit solution
Points:
50 (partial)
Time limit:
1.0s
Memory limit:
256M
Authors:
Problem type
Allowed languages
Java 19, Java 8
題目說明
設計一程式,讓使用者輸入數字,並存放於ArrayList中,直到使用者輸入的不是數字即結束輸入,最後將前三大的數值分別改為(由大到小): 1st
, 2nd
, 3rd
後輸出ArrayList中的值
輸入
數值
輸出
將前三大數值更改後輸出ArrayList中的值
測試資料0 輸入
1 2 3 4 5 .
測試資料0 輸出
1 2 3rd 2nd 1st
測試資料1 輸入
1 2 3 5 5 .
測試資料1 輸出
1 2 3rd 1st 2nd
Comments
題解