题目描述
Given a number $n$, give the last digit of sum of all the prime numbers from 1 to $n$ inclusive.
-----Input:-----
- First line contains number of testcase $t$.
- Each testcase contains of a single line of input, number $n$.
-----Output:-----
Last digit of sum of every prime number till n.
-----Constraints-----
- $1 \leq T \leq 10$
- $2 \leq N \leq 10^6$
-----Sample Input:-----
1
10
-----Sample Output:-----
7
输入格式
见题面
输出格式
见题面
样例输入
['1', '10']
样例输出
['7']