結果

問題 No.2 素因数ゲーム
ユーザー さとみんさとみん
提出日時 2020-09-27 00:40:02
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 341 ms / 5,000 ms
コード長 461 bytes
コンパイル時間 1,208 ms
コンパイル使用メモリ 25,696 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 13:18:43
合計ジャッジ時間 7,503 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 43 ms
4,380 KB
testcase_07 AC 49 ms
4,380 KB
testcase_08 AC 44 ms
4,380 KB
testcase_09 AC 341 ms
4,376 KB
testcase_10 AC 288 ms
4,380 KB
testcase_11 AC 137 ms
4,380 KB
testcase_12 AC 137 ms
4,380 KB
testcase_13 AC 275 ms
4,376 KB
testcase_14 AC 26 ms
4,380 KB
testcase_15 AC 81 ms
4,376 KB
testcase_16 AC 197 ms
4,380 KB
testcase_17 AC 295 ms
4,376 KB
testcase_18 AC 317 ms
4,376 KB
testcase_19 AC 183 ms
4,376 KB
testcase_20 AC 244 ms
4,380 KB
testcase_21 AC 329 ms
4,380 KB
testcase_22 AC 303 ms
4,380 KB
testcase_23 AC 142 ms
4,376 KB
testcase_24 AC 318 ms
4,380 KB
testcase_25 AC 236 ms
4,380 KB
testcase_26 AC 166 ms
4,380 KB
testcase_27 AC 88 ms
4,380 KB
testcase_28 AC 190 ms
4,380 KB
testcase_29 AC 155 ms
4,376 KB
testcase_30 AC 145 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
    implicit none
    
    integer :: n
    
    integer :: index = 0
    integer :: xor   = 0
    
    integer :: i
    
    read *, n
    
    do i = 2, n
        index = 0
        do while (mod(n, i) == 0)
            n = n / i
            index = index + 1
        end do
        
        xor = ieor(xor, index)
    end do
    
    if (xor == 0) then
        print '(A)', "Bob"
    else
        print '(A)', "Alice"
    end if
end program main
0