2 solutions

  • 2
    @ 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;
    }
    
    • 0
      @ 2026-11-28 19:20:05

      • 1

      Information

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