結果
問題 |
No.2 素因数ゲーム
|
ユーザー |
![]() |
提出日時 | 2018-05-18 10:12:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 254 ms / 5,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 1,399 ms |
コンパイル使用メモリ | 158,912 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 13:31:18 |
合計ジャッジ時間 | 3,114 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h> using namespace std; int N; int main(void){ cin >> N; int result = 0; for(int i = 2 ; N > 1 ; i++ ) { if((N % i) == 0){ int count = 0; while( ( N % i ) == 0 ) { ++count; N /= i; } result ^= count; } } if(result) cout << "Alice" << endl; else cout << "Bob" << endl; return 0; }