357


Submit solution

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

Authors:
Problem type

題目說明

使用者輸入一連串個數未定的整數,程式計算總共有多少個數字為3的倍數、有多少個數字為5的倍數、有多少個數字為7的倍數,當使用者輸入小於等於0的數字,程式停止計算,並依序輸出所有上述計算結果。

輸入資料限制:輸入數字都是整數,最小為-1000,最大為1000。最多輸入1000個。

輸入

一連串的整數

輸出

3的倍數個數 5的倍數個數 7的倍數個數

sample input1

3 5 15 25 35 105 0 3 5 7

sample output1

3 5 2

因為總共有3個數字為3的倍數、總共有5個數字為5的倍數、總共有2個數字為7的倍數。

sample input2

1 2 11 13 17 0 3 5 7

sample output2

0 0 0

sample input3

0

sample output3

0 0 0

Comments

There are no comments at the moment.