QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#3645. 秒表

الإحصائيات

Robin 刚刚从她祖父那里收到了一块秒表。Robin 的秒表上只有一个按钮。按下按钮会在停止和启动秒表计时器之间切换。当计时器开启时,显示的数值每秒增加 1。

最初,秒表处于停止状态,计时器显示为 0 秒。给定一系列按下秒表按钮的时间点,请确定秒表计时器最终显示的数值。

输入格式

输入的第一行包含一个整数 $N$ ($1 \le N \le 1\,000$),表示按下按钮的次数。

接下来的 $N$ 行按时间递增的顺序描述了按下按钮的时间。每行包含一个整数 $t$ ($0 \le t \le 10^6$),表示按下按钮的时间点。任意两次按键的时间点均不相同。

输出格式

如果在所有按键操作完成后秒表计时器仍在运行,输出 still running。否则,输出秒表计时器上显示的秒数。

样例

样例输入 1

2
7
11

样例输出 1

4

样例输入 2

5
2
5
9
10
17

样例输出 2

still running

样例输入 3

4
0
2
104
117

样例输出 3

15

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.