日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

省AK赛——J - Happy Great BG

發布時間:2025/7/14 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 省AK赛——J - Happy Great BG 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

原題:

Description

The summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coaches of ZJU ICPC TeamNavi and Fancy decided to BG everyone! Beside the two coaches, there areN participants. Those participants are divided into four groups to make problems for other groups.

After a brief discussion, they decided to go to Lou Wai Lou and have a great lunch. The cost for each person to have a meal inLou Wai Lou is W yuan. Though it is very expensive, there is a special discount thatLou Wai Lou provided: for every K persons, one of them can have a free meal.

Navi and Fancy will equally pay all the cost for this great BG. Please help them to calculate how much money they each need to pay. By the way, please take care that the minimum monetary unit of RMB is fen (0.01 yuan).

Input

There are multiple test cases (no more than 100).

For each test case, there is only one line which contains three numbers N (1 <= N <= 100), W (0 <=W <= 10000) and K (1 < = K <= 100).

Output

For each test case, output the money a coach need to pay, rounded into 0.01 yuan.

Sample Input

3 70 3 32 999 1

Sample Output

140.00 0.00

?

分析:

坑爹的水題。。。。。。wa了10多次+——加0.0049四舍五入——OK//今天感覺挺給力~^-^

源碼:

#include<stdio.h> int main() { int n,k; double w; while(scanf("%d%lf%d",&n,&w,&k)!=EOF) { double s=(n+2-(n+2)/k)*w/2;//親,注意教練人數 printf("%.2lf\n",s+0.0049); } return 0; }



?

轉載于:https://blog.51cto.com/bingsanchun/1271344

總結

以上是生活随笔為你收集整理的省AK赛——J - Happy Great BG的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。