2 solutions

  • 1
    @ 2025-4-12 11:37:32

    #include<bits/stdc++.h> using namespace std; int main() { int m,n; cin>>m>>n; int t=m; int s=0; while(t<=n) //枚举m到n之间的所有数 { if(t%17==0) //判断17的倍数 { s+=t; } t++; } cout<<s; return 0; }

    • 0
      @ 2024-12-15 14:49:58
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	double x;
      	cin>>x;
      	double cost;
      	if(x<=20)
      	{
      		cost=x*1.68;
      	}
      	else
      	{
      		cost=x*1.98;
      	}
      	cout<<fixed<<setprecision(2)<<cost;
      	return 0;
      }
      
      • 1

      Information

      ID
      21
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      219
      Accepted
      66
      Uploaded By