big tail


Submit solution

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

Authors:
Problem type

題目說明

輸入一連串個數未定的整數,每個整數都不重複,當遇到輸入值為0則視為輸入結束

程式輸出一樣的序列,除了把其中最大的數字移動到最後面輸出。

輸入資料限制:輸入數字都是整數,最小值為0,最大值為1000,第一個數字大於0。

輸入

一連串整數(輸入0結束)

輸出

最大的放最後面 其餘照順序輸出

請務必看清題意 藉由sample確認自己理解正確

sample input1

1 5 3 2 4 0 6

sample output1

1 3 2 4 5

sample input2

2 5 9 6 4 3 0 5

sample output2

2 5 6 4 3 9

sample input3

30 2 1 6 5 9 40 7 8 10 0 3 121

sample output3

30 2 1 6 5 9 7 8 10 40

Comments

There are no comments at the moment.