結果
問題 |
No.737 PopCount
|
ユーザー |
![]() |
提出日時 | 2018-05-02 22:44:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 1,835 ms |
コンパイル使用メモリ | 192,716 KB |
最終ジャッジ日時 | 2025-01-05 10:29:19 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | AC * 7 TLE * 8 |
ソースコード
#include<bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; int main() { int64 N; cin >> N; int64 ret = 0; for(int64 i = 1; i <= N; i++) { ret += 1LL * i * __builtin_popcountll(i) % mod; ret %= mod; } cout << ret << endl; }