4 条题解

  • 0
    @ 2023-6-26 17:12:34
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int k,s,y;
    	char w;
    	cin>>k>>w;
    	if(k<=1000){
    		s=8;
    	}if(k>1000) {
    		s=8+ceil((k-1000)*1.0/500)*4;	
    	}
    	if(w=='y') {
    		s+=5;
    	}
    	cout<<s;	
    	
    
    	return 0;
     }
    
    • 0
      @ 2023-6-20 16:47:18
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int k,s,y;
      	char w;
      	cin>>k>>w;
      	if(k<=1000){
      		s=8;
      	}if(k>1000) {
      		s=8+ceil((k-1000)*1.0/500)*4;	
      	}
      	if(w=='y') {
      		s+=5;
      	}
      	cout<<s;	
      	
      
      	return 0;
       }
      
      • 0
        @ 2023-5-11 17:35:11

        #include<iostream> #include<cmath> using namespace std; int main() { int a,sum; char b; cin>>a>>b; if(a<=1000) { sum=8; } else { sum=8+ceil((a-1000)/500.0)*4; } if(b=='y') { sum=sum+5; } cout<<sum; return 0; }

        • -6
          @ 2023-5-11 17:36:49
          #include<iostream>
          #include<cmath> 
          using namespace std;
          int main()
          {
          	int a,sum;
          	char b;
          	cin>>a>>b;
          	if(a<=1000)
          	{
          		sum=8;
          	}
          	else
          	{
          		sum=8+ceil((a-1000)/500.0)*4;
          	}
              if(b=='y')
          	{
          		sum=sum+5;
          	}
          	cout<<sum;
              return 0;
          }
          
        • 1

        信息

        ID
        610
        时间
        1000ms
        内存
        256MiB
        难度
        4
        标签
        (无)
        递交数
        323
        已通过
        144
        上传者