4 solutions

  • 1
    @ 2026-8-7 14:15:20
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int m,n,s=0;
    	cin>>m>>n;
    	int i=m;
    	while(i<=n)
    	{
    		if(i%17==0)
    		{
    			s=s+i;
    		}
    		i++;
    	}
    	cout<<s;
    	return 0; 
    }
    
    • 0
      @ 2026-8-21 21:33:53
      #include <bits/stdc++.h>
      using namespace std;
      
      int main()
      {
      	int m,n,s=0;
      	cin>>m>>n;
      	int i=m;
      	while(i<=n)
      	{
      		if(i%17==0)
      		{
      			s=s+i;
      		}
      		i++;
      	}
      	cout<<s;
      	return 0;
      }
      • 0
        @ 2025-1-12 15:06:58
        #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;
        }
        
        • -1
          @ 2024-12-15 16:30:29
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
          	int m,n;
          	cin>>m>>n;
          	int s=0;
          	for(int i=m;i<=n;i++)
          	{
          		if(i%17==0)
          		s+=i;
          	}
          	cout<<s;
          	return 0;
          }
          
          • 1

          Information

          ID
          47
          Time
          1000ms
          Memory
          256MiB
          Difficulty
          1
          Tags
          (None)
          # Submissions
          239
          Accepted
          94
          Uploaded By