6 条题解

  • 1
    @ 2025-7-28 14:29:32
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
    	cout<<n/5+(n/5)/6;
    } 
    
    • 0
      @ 2025-8-8 10:32:28

      又是一道水题

      直接输出好吧:

      #include<iostream>
      #define QwQ return 0;
      using namespace std;
      int n;
      int main(){
      	cin>>n;
      	n/=5;
      	n+=n/6;
      	cout<<n;
      	QwQ
      }
      
      • 0
        @ 2024-12-29 10:42:31
        #include<bits/stdc++.h>
        using namespace std;
        signed main(){
        	int n;
        	cin>>n;
        	cout<<n/5+n/30;
        }
        
        • 0
          @ 2024-12-28 12:03:29

          注意审题。。。

          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
          	int n;
          	cin>>n;
          	cout<<n/5+n/5/6;
          	return 0;
          }
          
          • 0
            @ 2024-12-22 11:03:54

            C++ :

            #include<iostream>
            using namespace std;
            int main(){
            	int q;
            	cin>>q;
            	q/=5;
            	if(q>=6){
            		cout<<q+q/6<<endl;
            	}
            	else{
            		cout<<q<<endl;
            	}
            	return 0;
            }
            

            Python :

            # coding=utf-8
            s=int(input())
            a=int(s//5+s//30)
            print(a)
            
            • -1
              @ 2024-12-28 16:14:57

              分段。分成优惠和不优惠两段,其中优惠是 n30\lfloor \frac{n}{30}\rfloor 元,而不优惠是 nn mod\bmod 3030 元。

              #include<bits/stdc++.h>
              #define int long long
              #define INF 0x3f3f3f
              using namespace std;
              int n;
              signed main(){
              	cin>>n;
              	cout<<n/30*7+n%30/5;//地板除
              	return 0;
              }
              
              • 1

              信息

              ID
              37
              时间
              1000ms
              内存
              128MiB
              难度
              1
              标签
              (无)
              递交数
              42
              已通过
              31
              上传者