随笔分类 - 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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1. The Max
阅读全文
摘要: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
阅读全文
摘要:今天无意想到除法,突然觉得自己对负数及负数的除法的意义并不清楚, 首先要明白负数中“负号”的意义,”负号”的意义在于“方向”。例如 我们定义 “给我”为+;“给你”为-。 那么下列除法用语言描述就是: 12/3=4,:给我12个苹果(+12),每次给我3个(+3),需要4次; 12/4=3:给我12
阅读全文

浙公网安备 33010602011771号