結果
| 問題 | No.567 コンプリート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-13 03:12:56 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 168 bytes |
| 記録 | |
| コンパイル時間 | 65 ms |
| コンパイル使用メモリ | 30,404 KB |
| 実行使用メモリ | 72,064 KB |
| 最終ジャッジ日時 | 2026-03-08 16:14:07 |
| 合計ジャッジ時間 | 1,029 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 12 |
コンパイルメッセージ
main.c:1:21: warning: data definition has no type or storage class
1 | double dp[1<<20][9];i,j;
| ^
main.c: In function ‘main’:
main.c:2:22: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
2 | main(n){for(dp[1][1]=scanf("%d",&n);++i<n;)for(j=0;j++<6;)dp[i+1][j+1]+=dp[i][j]*(6-j)/6,dp[i+1][j]+=dp[i][j]*j/6;
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | double dp[1<<20][9];i,j;
main.c:3:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
3 | printf("%.9lf",dp[n][6]);
| ^~~~~~
main.c:3:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
double dp[1<<20][9];i,j;
main(n){for(dp[1][1]=scanf("%d",&n);++i<n;)for(j=0;j++<6;)dp[i+1][j+1]+=dp[i][j]*(6-j)/6,dp[i+1][j]+=dp[i][j]*j/6;
printf("%.9lf",dp[n][6]);
}