最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

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

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 喜歡看電視上的體育比賽。 他今天要去看一場(chǎng)比賽。 比賽持續(xù)90分鐘,沒(méi)有休息時(shí)間。


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


你知道會(huì)有 n 個(gè)有趣的分鐘 t1,?t2,?...,?tn。 你的任務(wù)是計(jì)算利馬克會(huì)觀看比賽多少分鐘。


輸入

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


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

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

問(wèn)能看多少分鐘的比賽,每次加當(dāng)前精彩點(diǎn)的時(shí)間+15,去比對(duì)下一個(gè)精彩點(diǎn)的時(shí)間,如果超過(guò)90,返回,如果小于下一個(gè)精彩點(diǎn)的時(shí)間,直接退出循環(huán)即可,下面是代碼:


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

分享到微博請(qǐng)遵守國(guó)家法律
白玉县| 老河口市| 汝南县| 浏阳市| 乐清市| 梧州市| 宁国市| 淳安县| 栖霞市| 邮箱| 河池市| 泽州县| 新泰市| 扶绥县| 玉门市| 平顶山市| 龙海市| 蓝山县| 尖扎县| 屏东县| 涿州市| 阳朔县| 屏山县| 芒康县| 独山县| 安岳县| 志丹县| 铅山县| 平湖市| 北宁市| 报价| 尼勒克县| 台中市| 江孜县| 南丹县| 河间市| 门头沟区| 务川| 昭平县| 商都县| 新和县|