DOJ logoDOJ
LoginRegister
DOJ logoDOJ
Call for Tasks
DOJ logoDOJ

Community online judge with OI-style subtask scoring, Elo ratings, and Discord account linking.

Problems
ProblemsCategories
Community
ContestsRankingBoardNoticesHost an external contestGuide
Account
LoginRegisterJudge Status
Policy
Terms of ServiceDLC RulesPrivacyAPI documentationLanguage runtimesContest rank rewardsRating and performance
© 2026 DOJ
All rights reserved
Problems
Recently added problemsSaved problemsWorkbooks
CategoriesDLCContestsGroupsTeamsBoard
Ranking
Solved Problem RankingStreak rankingDOJ Power ranking
Status
Editorial

Rock Paper Scissors, and Kiwi

Back to problem

Editorial

Handle each case with conditional statements.

The kiwi move K cannot beat any move. Therefore, if one player chooses K, the other player wins.

If neither player chooses K, apply the usual rock-paper-scissors rules: S beats P, P beats R, and R beats S.

The time complexity is O(1)O(1)O(1).