ZOJ 3693 Happy Great BG(進位問題)

427 ワード

被虐爆発の一場
ソースリンク:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4976
#include <cstdio>
using namespace std;
int main()
{
    int n,k;
    double w;//double       
    while(~scanf("%d%lf%d",&n,&w,&k))
    {
        int t=(n+2)/k;
        double sum=(n+2-t)*w/2;
        printf("%.2lf
",sum+0.0049);// 0 } return 0; }