国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

CF 673A - Bear and Game

2023-07-07 18:38 作者:您是打尖兒還是住店呢  | 我要投稿

Bear Limak likes watching sports on TV. He is going to watch a game today. The game lasts 90 minutes and there are no breaks.


Each minute can be either interesting or boring. If 15 consecutive minutes are boring then Limak immediately turns TV off.


You know that there will be n interesting minutes t1,?t2,?...,?tn. Your task is to calculate for how many minutes Limak will watch the game.


Input

The first line of the input contains one integer n (1?≤?n?≤?90) — the number of interesting minutes.


The second line contains n integers t1,?t2,?...,?tn (1?≤?t1?<?t2?<?... tn?≤?90), given in the increasing order.

--------------------------------------------------

Bear Limak 喜歡看電視上的體育比賽。 他今天要去看一場比賽。 比賽持續(xù)90分鐘,沒有休息時間。


每一分鐘都可以很有趣,也可以很無聊。 如果連續(xù) 15 分鐘感到無聊,利馬克就會立即關(guān)掉電視。


你知道會有 n 個有趣的分鐘 t1,?t2,?...,?tn。 你的任務是計算利馬克會觀看比賽多少分鐘。


輸入

輸入的第一行包含一個整數(shù) n (1?≤?n?≤?90) — 有趣的分鐘數(shù)。


第二行包含 n 個整數(shù) t1,?t2,?...,?tn (1?≤?t1?<?t2?<?... tn?≤?90),以升序給出。

------------------------

問能看多少分鐘的比賽,每次加當前精彩點的時間+15,去比對下一個精彩點的時間,如果超過90,返回,如果小于下一個精彩點的時間,直接退出循環(huán)即可,下面是代碼:


CF 673A - Bear and Game的評論 (共 條)

分享到微博請遵守國家法律
荆门市| 丰宁| 高台县| 台州市| 桓台县| 霍邱县| 固镇县| 黑河市| 大埔区| 北海市| 石林| 五寨县| 伊通| 英超| 连平县| 波密县| 阿城市| 德保县| 西华县| 梁平县| 大洼县| 定边县| 封丘县| 偏关县| 抚顺县| 台安县| 盈江县| 湟源县| 台湾省| 石狮市| 平和县| 旅游| 通渭县| 驻马店市| 山东省| 清流县| 马关县| 高安市| 达尔| 游戏| 贡觉县|