随笔分类 -  PAT

摘要:The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a produc 阅读全文
posted @ 2019-07-10 16:51 流照君 阅读(175) 评论(0) 推荐(0)
摘要:Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off th 阅读全文
posted @ 2019-07-10 15:10 流照君 阅读(216) 评论(0) 推荐(0)
摘要:Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symme 阅读全文
posted @ 2019-07-10 10:24 流照君 阅读(158) 评论(0) 推荐(0)
摘要:Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文
posted @ 2019-07-09 20:04 流照君 阅读(188) 评论(0) 推荐(0)
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2019-07-06 16:08 流照君 阅读(222) 评论(0) 推荐(0)
摘要:Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ..., N​j​​ } where 1. The Max 阅读全文
posted @ 2019-07-06 08:51 流照君 阅读(126) 评论(0) 推荐(0)
摘要:Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha 阅读全文
posted @ 2019-07-03 10:53 流照君 阅读(213) 评论(0) 推荐(0)
摘要:今天无意想到除法,突然觉得自己对负数及负数的除法的意义并不清楚, 首先要明白负数中“负号”的意义,”负号”的意义在于“方向”。例如 我们定义 “给我”为+;“给你”为-。 那么下列除法用语言描述就是: 12/3=4,:给我12个苹果(+12),每次给我3个(+3),需要4次; 12/4=3:给我12 阅读全文
posted @ 2019-07-03 09:11 流照君 阅读(3974) 评论(0) 推荐(0)