結果
問題 |
No.1593 Perfect Distance
|
ユーザー |
👑 ![]() |
提出日時 | 2021-07-09 23:58:49 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 984 ms |
コンパイル使用メモリ | 29,440 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 18:53:37 |
合計ジャッジ時間 | 1,606 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 11 WA * 6 |
コンパイルメッセージ
main.c: In function 'main': main.c:10:9: warning: 'likely' attribute ignored [-Wattributes] 10 | if(N % i) [[likely]] continue; | ^~
ソースコード
#include <stdio.h> #include <stdint.h> int main(){ uint32_t N; scanf("%u", &N); uint32_t ans = 1, cnt; while((N & 1) == 0) N >>= 1; for(uint32_t i = 3; i <= 447; i += 2){ if(N % i) [[likely]] continue; cnt = 1; do{ N /= i; cnt += 2; }while(N % i == 0); if(N & 1) ans *= cnt; } if(N > 1 && N & 1) ans *= 3; printf("%u\n", ans - 1); }