304277: CF816A. Karen and Morning
Memory Limit:512 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Karen and Morning
题意翻译
## 题目描述 可怜已经准备好迎接在学校的新的一天。 现在是hh:mm,一个被以24小时制给与的时间。正如你所知道的,可怜喜欢回文,并且她相信如果在她醒来时的时间是回文的话会给她带来好运。 当她醒来时时间是回文的话,她最少应当睡多长时间? 记住,一个回文数是一个从前读和从后读相同的字符串。例如,05:39是不是回文数,因为05:39倒着读是93:50。另一方面,05:50是回文,因为05:50倒着读是05:50。 ### 输入格式: 仅有一行,包含一个格式为hh:mm的字符串($00\leq hh\leq23,00\leq mm\leq59$ )。 ### 输出格式: 仅输出一行一个整数,表示要使她醒来时的时间是回文,她所睡的最少时间。 ### 说明 在第一个样例中,可怜最少应睡的时间为$11$ ,这样她可以在05:50时醒来,这是一个回文时间。 在第二个样例中,可怜可以立刻起来,当前时间13:31就是一个回文。 在第三个样例中,可怜最少应睡的时间为$1$ 分钟。她可以在00:00醒来,这是一个回文时间。 感谢@Khassar 提供的翻译题目描述
Karen is getting ready for a new school day! ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF816A/d9d19918bc23426418750518f0726b72abe028b5.png)It is currently hh:mm, given in a 24-hour format. As you know, Karen loves palindromes, and she believes that it is good luck to wake up when the time is a palindrome. What is the minimum number of minutes she should sleep, such that, when she wakes up, the time is a palindrome? Remember that a palindrome is a string that reads the same forwards and backwards. For instance, 05:39 is not a palindrome, because 05:39 backwards is 93:50. On the other hand, 05:50 is a palindrome, because 05:50 backwards is 05:50.输入输出格式
输入格式
The first and only line of input contains a single string in the format hh:mm ( $ 00<= $ hh $ <=23 $ , $ 00<= $ mm $ <=59 $ ).
输出格式
Output a single integer on a line by itself, the minimum number of minutes she should sleep, such that, when she wakes up, the time is a palindrome.
输入输出样例
输入样例 #1
05:39
输出样例 #1
11
输入样例 #2
13:31
输出样例 #2
0
输入样例 #3
23:59
输出样例 #3
1