见代码,思路清晰
#include<iostream> using namespace std; int main() { int m, n; vector<int>V; while( cin>>m>>n ) { if( n>=m ) { bool IsFirst = true; for( int i=m; i<=n; i++ ) if( IsFirst ){ cout<<i; IsFirst = false; } else cout<<" "<<i; cout<<endl; } else if( m%(n+1)!=0 ) cout<<m%(n+1)<<endl; else cout<<"none"<<endl; } return 0; }
时间: 2024-10-09 03:10:56