【杭電2002】計算球體積
pow函式都是浮點型引數。你也可以直接列公式
#include<stdio.h>
#include<math.h>
#define PI 3.1415927
int main() {
double i,j;
while(scanf("%lf",&i)!=EOF)
{
j=PI*pow(i,3)*4/3;
printf("%.3f\n",j);
}
return 0;
}
相關推薦
【杭電2002】計算球體積
pow函式都是浮點型引數。你也可以直接列公式 #include<stdio.h> #include<math.h> #define PI 3.1415927 int mai
【杭電OJ】2032 楊輝三角
Problem Description 還記得中學時候學過的楊輝三角嗎?具體的定義這裡不再描述,你可以參考以下的圖形: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5
【杭電-oj】-2008-數值統計
Problem Description 統計給定的n個數中,負數、零和正數的個數。 Input 輸入資料有多組,每組佔一行,每行的第一個數是整數n(n<100),表示需要統計的數值的
【杭電-oj】-2076-夾角有多大
Problem Description 時間過的好快,一個學期就這麼的過去了,xhd在傻傻的看著表,出於對資料的渴望,突然他想知道這個表的時針和分針的夾角是多少。現在xhd知道的只有時間,請你幫
【杭電-oj】-1008-Elevator(電梯)
Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The num
【杭電oj1599】find the mincost route無向圖最小環
find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s
【杭電-oj】-1865-1sting(大數斐波那契數列)
1sting Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5021 Accepted Submiss
【杭電1285】確定比賽名次
確定比賽名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Othe
【杭電oj2021】發工資咯:)
發工資咯:) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 51230 Accepted Submis
【杭電1878】歐拉回路
歐拉回路 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Descr
【杭電-oj】 -1060-Leftmost Digit(輸出n的n次方最左邊數)
Problem Description Given a positive integer N, you should output the leftmost digit of N^N. Input The input contains several test
【杭電-oj】-2012-素數判定
Problem Description 對於表示式n^2+n+41,當n在(x,y)範圍內取整數值時(包括x,y)(-39<=x<y<=50),判定該表示式的值是否都為素數。
【杭電oj1159】Common Subsequence
Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total
【杭電2035】人見人愛A^B
#include<stdio.h> __int64 quick(int a,int b) { __int64 ans=1,base=a; __int64 t=0;
【杭電oj】2546
飯卡 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 20176 Accepted Submissio
Number Sequence 【杭電-1005】 附題+詳解
/*Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others
**【杭電2066】一個人的旅行--多源多地 dijsktra
一個人的旅行 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 32451 Accepted Submiss
【杭電oj】1280
前m大的數 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15329 Accepted Submis
【杭電-oj】-1064-Financial Management(財務管理)
Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough
【杭電oj2017】字串統計
字串統計 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 68606 Accepted Submissi