3.3k 3 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 The medieval interest in mechanical contrivances is well illustrated by the development of the mechanical clock, the oldest of which is driven by weights and controlled by a verge, an oscillating arm engaging with a...
2.1k 2 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 #include <stdio.h>main(){ int i; char *suffix[] = {"st", "nd", "rd"}; char *item[] = {"Unix", "cat", "sed",...
582 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given an integer n , break it into the sum of k positive integers, where k >= 2 , and maximize the product of those integers. Return the maximum product you can get. # Example 1 Input: n = 2 Output: 1 Explanation: 2 = 1 + 1, 1 × 1 = 1. # Example 2 Input: n = 10 Output:...
2.3k 2 分鐘

🌕🌗🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 After graduating from the University of Notre Dame, you obtained a job at Top Shelf Software, Inc., as an entry-level computer engineer. On the first day, your manager sits down with you and tasks you with the...
952 1 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Everybody sit down in a circle. Ok. Listen to me carefully. “Woooooo, you scwewy wabbit!” Now, could someone tell me how many words I just said? # Input Input to your program will consist of a series of lines, each...
1.4k 1 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 In “Rotating Sentences,” you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to bottom, your program will display them from...
661 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given an integer array of size n , find all elements that appear more than ⌊ n/3 ⌋ times. # Example 1 Input: nums = [3,2,3] Output: [3] # Example 2 Input: nums = [1] Output: [1] # Example 3 Input: nums = [1,2] Output: [1,2] # 解題思路 # Solution import java.util.ArrayList;import...
1.9k 2 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 In many computer problems, it is necessary to permute data arrays. That is, the data in an array must be re-arranged in some specified order. One way to permute arbitrary data arrays is to specify the permutations...
1.7k 2 分鐘

⭐️ # 題目敘述 Design a HashMap without using any built-in hash table libraries. Implement the MyHashMap class: MyHashMap() initializes the object with an empty map. void put(int key, int value) inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding...
2.4k 2 分鐘

🌕🌑🌑🌑🌑 # 題目連結 題目連結 Online Judge uDebug # 題目說明 Time limit: 3.000 seconds # 題目 Given a list of rectangles and a list of points in the x-y plane, determine for each point which figures (if any) contain the point. # Input There will be n(≤ 10) rectangles descriptions, one per line. The first...