#14297: 平方根


Aaaaaaaaaaaaa (羅傑)

學校 : 臺北市立大同高級中學
編號 : 69102
來源 : [111.235.208.242]
最後登入時間 :
2023-09-13 09:02:41
b679. 棄屍 (16+) | From: [203.72.178.252] | 發表日期 : 2018-07-12 13:27

//透過觀察,輸入數的2倍開根為解

#include <iostream>
#include<cmath>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
long long int a,b;
while(cin>>a){
b=sqrt(a*2);
cout<<b<<endl;
}
return 0;

}

 
ZeroJudge Forum