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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

hdu 4493 Tutor 水题

發布時間:2025/6/17 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 hdu 4493 Tutor 水题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Tutor

Time Limit: 20 Sec??Memory Limit: 256 MB

題目連接

http://acm.hdu.edu.cn/showproblem.php?pid=4493

Description

Lilin was a student of Tonghua Normal University. She is studying at University of Chicago now. Besides studying, she worked as a tutor teaching Chinese to Americans. So, she can earn some money per month. At the end of the year, Lilin wants to know his average monthly money to decide whether continue or not. But she is not good at calculation, so she ask for your help. Please write a program to help Lilin to calculate the average money her earned per month.

Input

The first line contain one integer T, means the total number of cases.
Every case will be twelve lines. Each line will contain the money she earned per month. Each number will be positive and displayed to the penny. No dollar sign will be included.

Output

The output will be a single number, the average of money she earned for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign without tail zero. There will be no other spaces or characters in the output.

Sample Input

2
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00
100.00

Sample Output

¥1581.42

¥100

HINT

題意

輸出十二個月的平均數,注意去掉后置0……

題解:

+0.005,這是一個特別屌的方法

代碼:

?

//qscqesze #include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <set> #include <vector> #include <sstream> #include <queue> #include <typeinfo> #include <fstream> #include <map> #include <stack> typedef long long ll; using namespace std; //freopen("D.in","r",stdin); //freopen("D.out","w",stdout); #define sspeed ios_base::sync_with_stdio(0);cin.tie(0) #define test freopen("test.txt","r",stdin) #define maxn 200001 #define mod 10007 #define eps 1e-9 int Num; char CH[20]; const int inf=0x3f3f3f3f; const ll infll = 0x3f3f3f3f3f3f3f3fLL; inline ll read() {ll x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f; } inline void P(int x) {Num=0;if(!x){putchar('0');puts("");return;}while(x>0)CH[++Num]=x%10,x/=10;while(Num)putchar(CH[Num--]+48);puts(""); } //**************************************************************************************double s; int main() {//test;int t=read();while(t--){double sum=0;for(int i=0;i<12;i++)cin>>s,sum+=s;sum/=12;int k=(sum+0.005)*100;if(k%100==0)printf("$%.0f\n",sum);else if(k%10==0)printf("$%.1f\n",sum);elseprintf("$%.2f\n",sum);} }

?

轉載于:https://www.cnblogs.com/qscqesze/p/4547576.html

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的hdu 4493 Tutor 水题的全部內容,希望文章能夠幫你解決所遇到的問題。

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

主站蜘蛛池模板: 国产农村妇女aaaaa视频 | 欧美日韩精品免费 | 国产成年无码久久久久毛片 | 国产手机在线视频 | 黄色片网站免费 | 日韩av一区二区三区四区 | 久久婷婷激情 | 高清视频免费在线观看 | 2025韩国大尺度电影 | 狠狠撸在线观看 | 成人www. | 成人久久一区 | 少妇无套内谢久久久久 | 全黄一级裸体 | 人操人爽 | 亚洲av人人澡人人爽人人夜夜 | 毛片一区二区三区 | 久久综合亚洲精品 | 国产一级二级在线 | 免费古装一级淫片潘金莲 | 自拍偷拍一区 | 高潮毛片 | 亚洲精品美女久久久 | 蜜臀av性久久久久蜜臀aⅴ四虎 | 狠狠躁狠狠躁视频专区 | 免费激情网站 | 青青草综合在线 | 日韩免费在线视频 | 久色视频 | 欧美日韩二区三区 | 国产精品成人3p一区二区三区 | 亚洲伦理精品 | 热久久久久久 | 中文字幕一区二区在线视频 | 国产精品第三页 | 亚洲爱v| 久久成人免费视频 | 手机在线免费av | 中文精品一区 | 秋霞午夜鲁丝一区二区 | 激情国产一区 | 风流老熟女一区二区三区 | 亚洲国产精品久久久久婷婷老年 | 久久久久久国产精品无码 | www.xxx国产 | 亚洲s码欧洲m码国产av | 亚洲免费av网址 | 美女av片| 美女精品一区 | 色无极在线| 粉嫩av一区二区三区四区五区 | 免费看欧美一级特黄a大片 国产免费的av | 清清草在线视频 | 欧美黄色免费视频 | free黑人多人性派对hd | 激情五月激情综合网 | 久久在线中文字幕 | 国模精品一区二区三区 | 日本精品少妇 | 国产精品男女视频 | 色免费看 | 69久久夜色精品国产69 | 亚洲jizzjizz| www黄色com | av在线视屏 | 一区二区三区福利视频 | 日韩电影中文字幕 | 免费播放黄色片 | 四虎影院污 | 99国内揄拍国内精品人妻免费 | 欧日韩不卡视频 | 国产男人搡女人免费视频 | 欧美黄色一区二区三区 | 欧美一区在线观看视频 | 精品女同一区二区三区 | 九九视频在线播放 | 久久综合88| 桃花色综合影院 | 丰满肥臀噗嗤啊x99av | 免费av一级片 | 久久国产精品精品国产色婷婷 | 99re6这里有精品热视频 | 欧美国产专区 | 香蕉视频国产在线观看 | 在线观看黄色片 | 天天天综合网 | 依依av| 青青青在线视频观看 | 免费人成在线观看网站 | 影音先锋在线视频观看 | 美女黄色一级视频 | 一区二区内射 | 色哟哟免费在线观看 | 天天摸天天看 | 九色丨蝌蚪丨成人 | 国产人妖一区二区三区 | 成人在线天堂 | 国产66页 | 久久久久成人精品无码中文字幕 |