DOJ logoDOJ
Problems
Recently added problemsSaved problems
CategoriesDLCContestsGroupsTeamsBoard
Ranking
Solved Problem RankingStreak rankingDOJ Power ranking
Status
Call for TasksLoginRegister
DOJ logoDOJ

Community online judge with OI-style subtask scoring, Elo ratings, and Discord-backed certification.

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
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).