which is the biggest?


Submit solution

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

Authors:
Problem types
Allowed languages
Java 19, Java 8

題目說明

使用者輸入一連串整數,輸入0表結束,結束後輸出所有輸入的整數與最大值

輸入限制: 整數(int) 範圍: -10000 到 10000

輸入

一連串整數,輸入0表結束輸入

輸出

所有輸入的整數與之中的最大值

請注意輸出格式(有換行)

sample input1

4 1 6 -8 9 0

sample output1

4 1 6 -8 9
max: 9

sample input2

-4 -1 -6 -8 -9 0

sample output2

-4 -1 -6 -8 -9
max: -1

Comments

There are no comments at the moment.