1 solutions

  • 1
    @ 2026-8-12 9:48:34

    点赞的是彭于晏(在最后输出c和f时要空格)

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        double a;
        cin>>a;
        double c=a-273.15;
        double f=c*1.8+32;
        if(f>212)
    	{
        	cout<<"Temperature is too high!";
    	}
    	else
    	{
    		cout<<fixed<<setprecision(2)<<c<<" "<<f;
    	}
        return 0;
    }
    
    • 1

    Information

    ID
    2209
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    221
    Accepted
    40
    Uploaded By