Type: Default 1000ms 256MiB

余数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

Special for beginners, ^_^

Description

给定一个整数 nn

输出 nn 分别除以2,3,4,5,8,9的余数。

Format

Input

多组数据。

第一行1个 TT,表示 TT 组数据。

每组数据输入2个整数 llnn,其中 ll 表示的是 nn 的位数。

Output

每组数据输出6个整数,分别为 nn 对2,3,4,5,8,9取余的答案。

Samples

1
3 123
1 0 3 3 3 6

Limitation

对于10%的数据,l10l \leq 10

对于另外10%的数据,l102l \leq 10^2

对于另外30%的数据,l103l \leq 10^3

对于所有数据,1l1041 \leq l \leq 10^41T21021 \leq T \leq 2 \cdot 10^2

不保证 nn 的最高位不是0

简单的考验

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
13
Start at
2025-1-23 9:00
End at
1970-1-1 8:00
Duration
-482665 hour(s)
Host
Partic.
2