結果
問題 |
No.1452 XOR×OR
|
ユーザー |
|
提出日時 | 2021-03-16 21:58:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 82,204 KB |
実行使用メモリ | 109,720 KB |
最終ジャッジ日時 | 2024-12-14 17:20:26 |
合計ジャッジ時間 | 109,818 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 TLE * 2 |
other | AC * 1 WA * 1 TLE * 34 |
ソースコード
n = int(input()) x = 1 ans = 0 while x*x <= n: if n % x != 0: continue o = n // x cnt = 1 for i in range(60): x_bit = x >> i & 1 o_vit = o >> i & 1 if x_bit == 1 and o_vit == 1: cnt *= 2 cnt %= 10**9+7 elif x_bit == 1 and o_vit == 0: cnt = 0 ans += cnt ans %= 10**9+7 x += 1 print(ans)