結果
問題 | No.2233 Average |
ユーザー |
![]() |
提出日時 | 2023-03-05 18:30:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 308 ms / 2,000 ms |
コード長 | 471 bytes |
コンパイル時間 | 3,944 ms |
コンパイル使用メモリ | 250,920 KB |
最終ジャッジ日時 | 2025-02-11 05:34:03 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll=long long;using ld=long double;ld pie=3.14159265359;ll inf=10000000000000001;ll mod=998244353;int main(){ll t;cin >> t;for (ll o = 0; o < t; o++){ll a,b,c,k;cin >> a >> b >> c >> k;for (ll i = 0; i < k; i++){if (a==b&&b==c){break;}ll aa=(b+c)/2,bb=(a+c)/2,cc=(b+a)/2;a=aa,b=bb,c=cc;}cout << a+b+c << endl;}}