結果

問題 No.560 ふしぎなナップサック
ユーザー te-shte-sh
提出日時 2017-08-25 22:35:26
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 2,581 ms
コンパイル使用メモリ 162,352 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 21:43:37
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.container; // SList, DList, BinaryHeap
import std.typecons;  // Tuple, Nullable, BigFlags
import std.math;      // math functions
import std.numeric;   // gcd, fft
import std.bigint;    // BigInt
import std.random;    // random
import std.bitmanip;  // BitArray
import core.bitop;    // bit operation
import std.regex;     // RegEx
import std.uni;       // unicode

void main()
{
  auto rd = readln.split.to!(int[]), m = rd[0], n = rd[1];
  auto e = m.to!real;

  foreach (_; 0..n)
    e = ((e+1) + (e*2)) / 3;

  writefln("%.9f", e);
}
0