【例16.2】 开灯
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
Little Blue's light is controlled by a linear switch. Pulling once turns the light on, pulling again turns it off. The light is initially off.
Input a positive integer () representing the number of times Little Blue pulls the switch. Determine if the light is on or off after pulls.
Input Format
Input a positive integer representing the number of times the switch is pulled ().
Output Format
Output integer if the light is on, or integer if the light is off.
Sample
51
20251108 A班作业(6)
- Status
- Done
- Problem
- 5
- Open Since
- 2025-11-8 0:00
- Deadline
- 2025-11-29 23:59
- Extension
- 24 hour(s)