NFLS Programming Training 2019-9-19

For international readers, please scroll down.

n k q p

In:
2 0 2 3
Out:
12

For 100%:

T
n1
n2
...
nT

T行。

In:
3
4
7
11
Out:
1
3
2
Explain:

For 40%:
For 70%:
For 100%:

C - 火星语 (opal.cpp)

s

Example

In:
{[4,3]?(1,2):7}
Out:
3

Constriants

Subtask 1: 只有()
Subtask 2: 只有()[]
Subtask 3:

A - Sum

Statement

Find the sum of the q-th term to the p-th term of

n k q p

Output

One integer, module 1e9+7

In:
2 0 2 3
Out:
12

For 100%:

B - Multiple

Statement

Find the minimal digit '1' in the multiple of the given integer N. You need to solve the question T times.

T
n1
n2
...
nT

T lines.

In:
3
4
7
11
Out:
1
3
2
Explain:

For 40%:
For 70%:
For 100%:

C - Opal

Statement

Define (a,b)=(a+b)%10000
Define [a,b]=(a<b?0:9999)
Define {a?b:c}=(a%2==1?b:c)
Find the value of a given expression s.

s

One integer

Example

In:
{[4,3]?(1,2):7}
Out:
3

Constriants

Subtask 1: S contains operation () only
Subtask 2: S contains operation () and [] only
Subtask 3: