結果
| 問題 |
No.560 ふしぎなナップサック
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-25 22:23:18 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 243 bytes |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 72,312 KB |
| 最終ジャッジ日時 | 2025-01-05 02:28:02 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main() {
double M;
int n;
cin >> M >> n;
for (int i = 0; i < n; i++) {
M = (M * 2 + M + 1) / 3;
}
printf("%.20f\n", M);
}