1.5k 1 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k . For example, the string ”abcabcabcabc” has period 3 , since it is formed by 4...
1.5k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given a string s , remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible results. Lexicographically Smaller A string a is lexicographically smaller than a string b if in the...
526 1 分鐘

⭐️ # 題目敘述 You are given two strings s and t . String t is generated by random shuffling string s and then add one more letter at a random position. Return the letter that was added to t . # Example 1 Input: s = "abcd", t = "abcde" Output:...
3.3k 3 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judge Ito has asked...
3.6k 3 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string “ABCDEDCBA” is a palindrome because it is the same when the string is read from left to right as...
2k 2 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculator. As a computer scientist you suggested to the company that it would be neato if this new...
1.9k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given an array of words where each word consists of lowercase English letters. wordA is a predecessor of wordB if and only if we can insert exactly one letter anywhere in wordA without changing the order of the other characters to make it equal to wordB . For example,...
1.8k 2 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 For hundreds of years Fermat’s Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that an=bn+cna^n = b^n + c^nan=bn+cn , has remained elusively unproven. (A recent...
2.2k 2 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 From the article Number Theory in the 1994 Microsoft Encarta: “If a, b, c are integers such that a = bc, a is called a multiple of b or of c, and b or c is called a divisor or factor of a. If c is not ±1, b is called...
1.5k 1 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 The Joseph’s problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, ..., n , standing in circle every m-th is going to be executed and only the life...