結果

問題 No.567 コンプリート
ユーザー Ryuhei Mori
提出日時 2017-09-09 17:34:31
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 30,464 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-14 15:50:08
合計ジャッジ時間 816 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>

int main(){
  int i, c, n;
  double x;
  scanf("%d", &n);
  c = -1;
  x = 0;
  for(i=1;i<=6;i++){
    c *= i-7;
    c /= i;
    x += c * pow(1-i/6.0, n);
  }
  printf("%.10f\n", 1-x);
  
  return 0;
}
0