1 solutions

  • 0
    @ 2025-3-3 16:30:28

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main() {
    	int m,n;
    	cin>>m>>n;
    	int c = 0;
    	for(int i = m;i <= n;i++){
    		if(i % 6 == 0 || i % 8 == 0){
    			c++;
    		}
    	}
    	cout<<c;
    	return 0;
    }
    
    • 1

    Information

    ID
    10338
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By