3011: 循环控制语句-找出第一个能被3和5整除的数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:3
Description
输入n个数,找出第一个能同时被3和5整除的数
Input
第一行输入n(1≤n≤100),第二行输入n个整数(1≤每个数≤1000)
Output
输出第一个能同时被3和5整除的数,没有则输出-1
Sample Input Copy
7
3 5 9 15 20 30 45
Sample Output Copy
15