#Lutece3225. 数学专题签到处
数学专题签到处
Migrated from Lutece 3225 数学专题签到处
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
给定常数 ,共 次询问。
每次给定 ,求
答案对 取模。
Input
第一行,两个正整数 和 。
接下来 行,每行一个正整数 。
Output
共 行,每行一个整数,表示答案。
Samples
5 3
10
14
5
3069
15
3927
Constraints
,,
Resources
2024 UESTC ICPC Training for Math