随笔分类 -  训练level0

上一页 1 2 3 下一页
暴力可解决的问题
1168 Prime Day(20)
摘要:The above picture is from Sina Weibo, showing May 23rd, 2019 as a very cool "Prime Day". That is, not only that the corresponding number of the date 2 阅读全文
posted @ 2023-03-01 00:02 Coder何 阅读(36) 评论(0) 推荐(0)
力扣3. 无重复字符的最长子串
摘要:给定一个字符串 s ,请你找出其中不含有重复字符的 最长子串 的长度。 示例 1: 输入: s = "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 示例 2: 输入: s = "bbbbb" 输出: 1 解释: 因为无重复字符的最长子串是 "b" 阅读全文
posted @ 2023-02-15 23:46 Coder何 阅读(28) 评论(0) 推荐(0)
力扣49. 字母异位词分组
摘要:给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的字母得到的一个新单词,所有源单词中的字母通常恰好只用一次。 示例 1: 输入: strs = ["eat", "tea", "tan", "ate", "nat", "bat"] 输出: 阅读全文
posted @ 2023-02-02 19:57 Coder何 阅读(33) 评论(0) 推荐(0)
1009 Product of Polynomials
摘要:This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2022-08-15 00:01 Coder何 阅读(46) 评论(0) 推荐(0)
1006 Sign In and Sign Out(25分)
摘要:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2022-08-14 22:22 Coder何 阅读(29) 评论(0) 推荐(0)
1002 A+B for Polynomials (25分)
摘要:This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2022-07-24 22:01 Coder何 阅读(40) 评论(0) 推荐(0)
1042 Shuffling Machine (20分)
摘要:Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "ins 阅读全文
posted @ 2022-07-10 23:27 Coder何 阅读(27) 评论(0) 推荐(0)
1041 Be Unique (20分)
摘要:Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a numbe 阅读全文
posted @ 2022-07-10 22:45 Coder何 阅读(23) 评论(0) 推荐(0)
1035 Password (20分)
摘要:To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords 阅读全文
posted @ 2022-07-10 22:31 Coder何 阅读(31) 评论(0) 推荐(0)
1031 Hello World for U(20分)
摘要:Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as: h d e l l 阅读全文
posted @ 2022-06-06 10:55 Coder何 阅读(89) 评论(0) 推荐(0)
1027 Colors in Mars(20分)
摘要:People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
posted @ 2022-06-02 17:21 Coder何 阅读(24) 评论(0) 推荐(0)
1023 Have Fun with Numbers(20分)
摘要: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 @ 2022-06-02 16:57 Coder何 阅读(36) 评论(0) 推荐(0)
1019 General Palindromic Number(20分)
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2022-06-02 15:22 Coder何 阅读(27) 评论(0) 推荐(0)
1015 Reversible Primes(20分)
摘要:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re 阅读全文
posted @ 2022-05-31 15:50 Coder何 阅读(32) 评论(0) 推荐(0)
1011 World Cup Betting(20分)
摘要:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2022-05-18 16:29 Coder何 阅读(98) 评论(0) 推荐(0)
1008 Elevator(20分)
摘要:The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev 阅读全文
posted @ 2022-05-18 11:13 Coder何 阅读(41) 评论(0) 推荐(0)
1005 Spell It Right(20分)
摘要:Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat 阅读全文
posted @ 2022-05-18 10:59 Coder何 阅读(18) 评论(0) 推荐(0)
1001 A+B Format (20 分)
摘要: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 @ 2021-05-15 16:59 Coder何 阅读(52) 评论(0) 推荐(0)
敲7-计蒜客
摘要:有一种酒桌游戏叫做“敲7”,规则是从一个人开始,说出任意数字,其他人会顺序往后报,如果一个数字包含 7,或者是 7 的倍数,那么需要敲打杯子或盘子,不能说出。 现在 n个人围坐在一个圆桌周围,他们编号从 1 到 n 顺时针排列。从某一人开始报出一个数字,其他人会按照顺时针方向顺序往后报(加一),如果 阅读全文
posted @ 2020-08-29 23:52 Coder何 阅读(1156) 评论(0) 推荐(0)
L1-054 福到了 (15分)
摘要:“福”字倒着贴,寓意“福到”。不论到底算不算民俗,本题且请你编写程序,把各种汉字倒过来输出。这里要处理的每个汉字是由一个 N × N 的网格组成的,网格中的元素或者为字符 @ 或者为空格。而倒过来的汉字所用的字符由裁判指定。 输入格式: 输入在第一行中给出倒过来的汉字所用的字符、以及网格的规模 N 阅读全文
posted @ 2020-07-27 16:42 Coder何 阅读(723) 评论(0) 推荐(0)

上一页 1 2 3 下一页