結果
| 問題 |
No.3241 Make Multiplication of 8
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-12 09:23:47 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 509 bytes |
| コンパイル時間 | 16,445 ms |
| コンパイル使用メモリ | 318,672 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-09-12 09:24:07 |
| 合計ジャッジ時間 | 17,145 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
using ll = long long;
const ll MOD = 998244353;
#include<atcoder/all>
using namespace atcoder;
using mint = modint998244353;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n;cin>>n;
ll ans=0;
rep(i,n){
ll a,b;cin>>a>>b;
ll cnt=0;
while(a%2==0){
a/=2;
cnt++;
}
ans+=min(ll(3),cnt)*b;
}
cout<<ans/3<<endl;
}