add remainders division by 7


Submit solution

Points: 20
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

題目說明

<1121檢定考題>
從鍵盤輸入n(n>0),接著讀入n個正整數,找出這n個正整數中除7餘數為1的數。請將這些符合條件的數加總後輸出。

輸入

請由鍵盤輸入n(n>0),接著讀入n個正整數。

輸出

請由螢幕輸出除7餘數為1的數之加總值。

sample input & output

輸入 輸出
樣本1 6
8 19 21 3 9 29
37
樣本2 5
15 1 20 91 7
16
樣本3 2
63 58
0

Comments

There are no comments at the moment.