MCPcopy Create free account
hub / github.com/ROUTINE-STUDY/Algorithm / divisorGame

Method divisorGame

LeetCode/Math/1025. Divisor Game/Sanghoo.java:9–11  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

7
8 // Alice가 첫 번째로 무조건 시작하는데, 2명이서 turn제 게임이면 짝수면 무조건 Alice 승리 아닌가?
9 public static boolean divisorGame(int n) {
10 return (n%2 == 0) ? true : false;
11 }
12
13 public static void main(String[] args) {
14 System.out.println(divisorGame(3));

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected