Bộ bài tập tự sinh (10 câu · Suy luận logic, Thứ tự & Tập hợp)
Mã đề: 73677847 · Khớp 29 mẫu bài trong thư viện.
Question 1
Trung bình · +20 điểm
Letters $A$–$Z$ are numbered $1$–$26$ ($A=1, \dots, Z=26$). A Caesar cipher shifts every letter forward by $11$ positions, wrapping around after $26$ back to $1$. What position number does letter #23 shift to?
Xem đáp án và lời giải
Đáp án: $8$
Ta có $23 + 11 = 34$. Vì vượt quá $26$, quay vòng trừ đi $26$ được $8$.
A pile has $24$ coins. Two players take turns removing $1$ to $3$ coins, and the player forced to take the last coin LOSES. How many coins should the first player take on move $1$ to leave a winning remainder ($\equiv 1 \pmod{4}$)?
Xem đáp án và lời giải
Đáp án: $3$
Muốn đối thủ bốc viên cuối, cần đưa tổng về dạng $(4)m + 1$. Ta có $24 - 3 = 21 \equiv 1 \pmod{4}$, nên bốc $3$ đồng xu.
Question 3
Trung bình · +20 điểm
Given binary inputs $A = 1, B = 0, C = 0, D = 1$, evaluate the four logic gates:
- $G_1 = A \text{ AND } B$
- $G_2 = C \text{ OR } D$
- $G_3 = A \text{ XOR } C$
- $G_4 = B \text{ XOR } D$
How many of these four gates output $1$?
Xem đáp án và lời giải
Đáp án: $3$
Tính từng cổng: $G_1 = 0, G_2 = 1, G_3 = 1, G_4 = 1$. Tổng số cổng có đầu ra $1$ là $3$.
In a survey of students who play at least one sport: $12$ play Soccer, $16$ play Basketball, $15$ play Tennis; $5$ play Soccer & Basketball, $5$ play Basketball & Tennis, $5$ play Soccer & Tennis, and $3$ play all three. How many students are in the survey in total?
Xem đáp án và lời giải
Đáp án: $31$
Theo công thức bù trừ $3$ tập hợp: $12 + 16 + 15 - (5 + 5 + 5) + 3 = 31$.
Question 5
Trung bình · +20 điểm
$1$ melon weighs as much as $3$ apples, and $1$ apple weighs as much as $3$ strawberries. If $1$ strawberry weighs $3\text{ g}$, how many grams does $1$ melon weigh?
Xem đáp án và lời giải
Đáp án: $27$
$1$ quả dưa nặng bằng $3 \times 3 = 9$ quả dâu, tức là $9 \times 3 = 27\text{ g}$.
Four dominoes are placed in a chain so touching halves have equal dots: $[5|\,2]$–$[2|\,x]$–$[x|\,1]$–$[1|\,4]$. If the total number of dots on all four dominoes is $19$, what is $x$?
Xem đáp án và lời giải
Đáp án: $2$
Tổng các chấm đã biết là $5 + 2(2) + 2(1) + 4 = 15$, nên $2x = 4 \Rightarrow x = 2$.
In a game of Nim, there are three piles with $7$, $6$, and $3$ stones. On your turn, you may remove any positive number of stones from a single pile (the player taking the last stone wins). How many stones must you remove from the pile of $3$ to reach a winning Nim-sum ($0$) position?
Xem đáp án và lời giải
Đáp án: $2$
Tính tổng XOR hai đống đầu: $7 \oplus 6 = 1$. Cần giảm đống $3$ xuống còn $1$, tức là bốc đi $3 - 1 = 2$ viên.
An apple weighs $127\text{ g}$. A pear is $29\text{ g}$ heavier than the apple, and a mango is $43\text{ g}$ lighter than the pear. How much does the mango weigh (in grams)?
Xem đáp án và lời giải
Đáp án: $113$
Quả lê nặng $127 + 29 = 156\text{ g}$, nên quả xoài nặng $156 - 43 = 113\text{ g}$.
In a $4 \times 4$ mini-Sudoku (using digits $1, 2, 3, 4$ once per row, column, and $2 \times 2$ box), row $1$ already has $1, 3$ and column $4$ already has $4$ outside row $1$. What digit MUST go in row $1$, column $4$?
Xem đáp án và lời giải
Đáp án: $2$
Hàng $1$ đã có $1, 3$ và cột $4$ đã có $4$, nên ô giao nhau chỉ có thể là chữ số còn lại là $2$.
Question 10
Trung bình · +20 điểm
A row of $5$ lamps encodes a number in binary, where ● means $1$ (ON) and ○ means $0$ (OFF), from left (highest place value) to right ($1$). What number does ● ● ● ○ ● represent?
Xem đáp án và lời giải
Đáp án: $29$
Dãy đèn tương ứng số nhị phân $11101_2 = 29$.