NOJ答案c++版_第1頁
NOJ答案c++版_第2頁
NOJ答案c++版_第3頁
NOJ答案c++版_第4頁
NOJ答案c++版_第5頁
已閱讀5頁,還剩4頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、計(jì)算 A+B 圓及圓球等的相關(guān)計(jì)算 計(jì)算成績(jī) 找最大數(shù) 找幸運(yùn)數(shù)計(jì)算A+B計(jì)算A+BTime limit 3CWns. Wemory Umit IWOOiff# 】Acctsd: 1CW7$, Total Submbsiofiv ?46UDescription itzInputOutputSample InputSdrilpir (XrEHil#in elude using n ames pace std; int mai n()int A,B,c;cin AB;c=A+B;coutce ndl;return 0;圓及圓球等的相關(guān)計(jì)算File N-cirne : T(5O2.cpp圓及圓球等的

2、相關(guān)計(jì)算Time Limir SOOChis. Memorv Limit; lOOOOKB Accqpledl. 95W , TaCdi Subnrvssions. 30555Description確Aja半倍和樣工片貲礴張L圜碼軋ESiSRsq.砂本積vq和明刪細(xì)input瞬小英里*石辛樣金陸Output超ilW岀=1,-無巳,出焙向氐 園球悴機(jī)柱卿.幣瞥?金1邀.結(jié)半釧MiT- #in elude #i nclude using n ames pace std; #defi ne PI 3.1416int mai n()double r,h,l,s,sq,vq,vz;cin rh;l=2*

3、 Pl*r;s=P l*r*r;sq=4* PI *r*r;vq=4* PI*r*r*r/3;vz=s*h;coutfixedset precisi on( 2)le ndl; coutfixedset precisi on( 2)se ndl;coutfixedset precisi on( 2)sqe ndl;coutfixedset precisi on( 2)vqe ndl;coutfixedset precisi on( 2)vze ndl; return 0;計(jì)算成績(jī)計(jì)算成績(jī)Tiiiiie Limit OODrs , Mmiiiiv I iiiiit lOGGOKB , Auept

4、ed: 9 319, TdH SqjtMi11s,sipriv 1 99SDescription諭入早學(xué)牛的tS學(xué),互謠和r語古評(píng)Kr閥.輸出慣字牛一-用腳瞬和平均fit濰Input輸A弼t呷1 用辛橋齡陽Output輸出為實(shí)型*導(dǎo)笛tME.瞰.絡(luò)杲祀彳施岀一個(gè)#in elude #i nclude using n ames pace std;int mai n()double a,b,c,A,B;/定義數(shù)學(xué)成績(jī)a,英語成績(jī)b,e語言成績(jī)ccin abc;A=a+b+c;B=A/3.0;coutfixedset precisi on( 6)Ae ndl;coutfixedset precisi

5、 on( 6)Be ndl;return 0;T-mc-lmw: s 2035- - -! hooT - y3F 12竺 b=t3ms4snF JJ3匸De 聲 pfion-npuiOLdpui#inc-ude Aiosfreamvusing namespace skhinf 3ain()宀inf ABGcinvvAVVBVVC 八 if(AVB a&. Ave) coufAAAAAendre-seif(BVA 00 Bve) coufAABAAendre-se coufAACAAendrref urn aTins LimF 痔mSv L m汗:,莒舊 9養(yǎng)LmEM 9533* Told5旦呂

6、親巴193sDewc豆5n芻昭韋烹左嘗觸亨一一圧ik 書-d泊訂歲 直護(hù)二禧號(hào)7 .-二-二宀-二晉-U口農(nóng).刁立P尋手vpr邊霆:m-nput 堆 AOLdpuisamp? 3purMm目-c os-#include using namespace std; int main()int m,n,a,b,c,d,e,f; cinm; a=m%10;b=m/10%10; c=m/100%10;d=m/1000%10;e=m/10000%10;if(e=0) if(d=0) if(c=0) if(b=0) if(a=0) n=0; else n=a;else n=a*10+b;else n=a*1

7、00+b*10+c;else n=a*1000+b*100+c*10+d;else n=a*10000+b*1000+c*100+d*10+e; if(m=n) coutyesendl;else coutnoendl;return 0;獎(jiǎng)金發(fā)放獎(jiǎng)金發(fā)放Time LiniiL. 3000rs , Meniuiy Liniil lOOOOkB , AttepLed 66 , Toldl Subniissrors ifiSlSDescri ption企業(yè)卻柚獎(jiǎng)鉗加闔鋰底+4汁妬十10尢”奠金創(chuàng)叩慣 冷離55十10山.陽,低十藥Zu曲,厲亠10的部 雋手】0山兒的郡分.可握咸工宓;剖丿丹HULW冋阿,

8、高扌胡/打曲部f可零驚.佃人郵;U打QrHTp 40;niffiS ,呵酗熬” 607jtlJ100?jZi.Jj高十閃丿曲湯:吿” ”嘶工, ;S+100;jjij坦辿】皿丿川!?誣;展 I如L JW)盤1當(dāng)口副閩.煽魚數(shù)覽金總敢扌Input瞅卻t壁伸ti為力血Output輯出脊艾t, gffi六竝小鍛(申昭打兒)#in elude #i nclude using n ames pace std;int mai n()double w,y;cin w;if(w=10) y=0.1*w;else if(w=20) y=(w-10)*0.075+1;else if(w=40) y=(w-20)*

9、0.05+1.75;else if(w=60) y=(w-40)*0.03+2.75;else if(w=100) y=(w-60)*0.015+3.35;elsey=(w-60)*0.01+3.95;coutfixedset precisi on( 6)yrs , MeltlcjlV I imil lOCOOKB , AurtHed SS37 , ToUbJ SLibniisionS iS7S4Description也i出謝車的血強(qiáng)林魁:蛍,內(nèi).S丄公里)溝廠血膽過上公里口社15魚蟲i內(nèi) 舍I b幺生丨時(shí)每苕里臨期上 幾.坦過1 52鯉 血公更牧空空 幾,不足1魚里?姍1公里收費(fèi).Input

10、爺人為實(shí)耿單位為貫Output輸出丈型舉留7訶辺J勸單怕為帀法一【“取余的充分運(yùn)用】#in clude #i nclude using n ames pace std; int mai n()double s,y; int a,b,c; cin s;c=s;a=s*10;b=a%10;if(s=2) y=7;else if(s=15) if(b=0) y=7+1.5*(s-2);else y=7+1.5*(c-1);else if(b=0) y=26.5+2.1*(s-15); else y=26.5+2.1*(c-14);coutfixedset precisi on( 6)ye ndl; return 0;法二【ceil 函數(shù)】 #inelude #in clude #i nclude using n ames

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論