Download c 2 2023 jr

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
2022-2023 ● Contest 2: Short Problems ● Junior Division
1. Prefix/Infix/Postfix Notation
Evaluate the following prefix expression if all numbers are single digits:
+−*23/42^23
A.
B.
C.
D.
E.
14
4
12
10
6
A.
B.
C.
D.
E.
AB+C/BC*AC−/−
A+BC/BC*AC−/−
ABC+/BC*AC−/−
AB+C/B*CAC−/−
AB+C/BC*A−C/−
A.
B.
C.
D.
E.
01000
11100
00111
11111
00000
A.
B.
C.
D.
E.
00010
10001
00001
00100
01100
2. Prefix/Infix/Postfix Notation
Convert the following infix expression to postfix:
𝐴+𝐵
𝐶
−
𝐵*𝐶
𝐴−𝐶
3. Bit-String Flicking
Evaluate:
10100 OR 01100 AND 01011
4. Bit-String Flicking
Evaluate:
(LCIRC-2 (RSHIFT-1 (NOT 01110)))
5. What Does This Program Do? (Looping)
What is the following program’s output for the given input values?
p = 1000, r = 10, t = 3
input p, r, t
o = p
for c = 1 to t
i = p * r / 100
p = p + i
next c
f = p - o
output f
A.
B.
C.
D.
E.
100
110
121
331
1331
Related documents