求助

P2433 【深基1-2】小学数学 N 合一

毙鼠山庄庄主 @ 2020-11-01 19:11:17

pow(43.141593(444+101010) /3 ,(float)1/3)

pow( (4/3) 3.141593(444+101010),(float)1/3)

的结果不一样是怎么回事?


by justinjia @ 2020-12-25 16:55:07

@毙鼠山庄庄主 你这一会斜体一会粗体,是专门用来强调的,还是本来要打*号结果被Markdown识别成了斜体/粗体?


by 初雪_matt @ 2021-01-08 12:42:35

好好重学Markdown吧,都不知道你在写什么


by walleye @ 2021-02-22 16:27:59

@毙鼠山庄庄主 。。。无话可说


by Lucashuang @ 2021-09-26 21:19:03

#include<iostream>
#include<cstdio>
#include<math.h>
using namespace std;
int main(){
    int n;
    double pi = 3.141593;
    cin >> n;
    if(n == 1){
        cout << "I love Luogu!" << endl;
    } else if(n == 2){
        cout << "6 4" << endl;
    } else if(n == 3){
        cout << "3" << endl << "12" << endl << "2" << endl;
    } else if(n == 4){
        printf("%0.3lf" , 500.0 / 3);
    } else if(n == 5){
        cout << "15" << endl;
    } else if(n == 6){
        cout << sqrt(117) << endl;
    } else if(n == 7){
        cout << "110" << endl << "90" << endl << "0" << endl;
    } else if(n == 8){
        cout << 2 * pi * 5 << endl << pi * (5 * 5) << endl << (4.0 / 3) * pi * (5 * 5 * 5) << endl;
    } else if(n == 9){
        cout << "22" << endl;
    } else if(n == 10){
        cout << "9" << endl;
    } else if(n == 11){
        cout << 100.0 / (8 - 5) << endl;
    } else if(n == 12){
        cout << "13" << endl << "R" << endl;
    } else if(n == 13){
        cout << round(pow((4.0 / 3) * pi * (4 * 4 * 4 + 10 * 10 * 10) , 1.0 / 3)) << endl;
    } else if(n == 14){
        cout << "50" << endl;
    }
}

|