Raise Both Hands
ABC 370Problem 46 of 50
EasyWhat to do
Snuke raises hands to signal: left hand only (L=1, R=0) → 'Yes' (wants takoyaki), right hand only (L=0, R=1) → 'No' (doesn't want it), both or neither → 'Invalid'.
Key Concepts
if-statements
input and output
conditional logic
Examples
Input:
L = 1, R = 0
Output:
Yes
Input:
L = 0, R = 1
Output:
No
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...