Problem3468--【Div3】abc422c - AtCoder AAC Contest

3468: 【Div3】abc422c - AtCoder AAC Contest

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description



Sample Input Copy

5
3 1 2
100 0 0
1000000 1000000 1000000
31 41 59
1000000000 10000 1

Sample Output Copy

2
0
1000000
31
1

Source/Category