結果

問題 No.2 素因数ゲーム
ユーザー uafr_csuafr_cs
提出日時 2015-06-03 03:25:47
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 2,008 ms
コンパイル使用メモリ 71,660 KB
実行使用メモリ 56,740 KB
最終ジャッジ日時 2023-09-20 18:57:14
合計ジャッジ時間 8,303 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,308 KB
testcase_01 AC 122 ms
56,740 KB
testcase_02 AC 123 ms
55,584 KB
testcase_03 AC 120 ms
55,860 KB
testcase_04 AC 121 ms
55,884 KB
testcase_05 AC 122 ms
55,988 KB
testcase_06 AC 121 ms
55,644 KB
testcase_07 AC 121 ms
56,160 KB
testcase_08 WA -
testcase_09 AC 120 ms
55,572 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 123 ms
55,688 KB
testcase_13 AC 122 ms
55,812 KB
testcase_14 AC 122 ms
55,948 KB
testcase_15 AC 122 ms
56,172 KB
testcase_16 WA -
testcase_17 AC 120 ms
53,664 KB
testcase_18 AC 124 ms
55,756 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 119 ms
55,684 KB
testcase_27 AC 120 ms
55,680 KB
testcase_28 AC 122 ms
55,788 KB
testcase_29 AC 124 ms
55,900 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		long N = sc.nextLong();
		
		int xor = 0;
		for(long i = 2; i <= 10000; i++){
			int count = 0;
			
			while(N % i == 0){
				N /= i;
				count++;
			}
			
			xor ^= count;
		}
		
		System.out.println(xor == 0 ? "Bob" : "Alice");
		
	}
	
}
0