3846: Function

内存限制:256 MB 时间限制:10.000 S
评测方式:文本比较 命题人:
提交:4 解决:2

题目描述

Jerry is fond of functions. He thinks the mystery of the universe is hidden behind the notations, variables and numbers.
Of all functions, he thinks gcd and ⌊x⌋ are the most fascinating, and that something combines gcd with truncation should be even more marvelous.
Therefore, he comes up with a problem: calculate
∑_n^i=1 gcd(⌊3√3⌋,i )  mod998244353

输入

The input contains several test cases.
The first line contains an integer T(1≤T≤11), the number of test cases.
Each of the next T lines contains a integer n(1≤n≤10^21), indicating a query.

输出

For each test case, output one line containing an integer indicating the corresponding answer.
 

样例输入 复制

10
64
180
526
267
775
649
749
908
300
255

样例输出 复制

103
327
1069
522
1693
1379
1631
1998
606
492

来源/分类