mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
24 lines
473 B
C++
24 lines
473 B
C++
|
#include <iostream>
|
||
|
#include<string>
|
||
|
#include<cstdio>
|
||
|
using namespace std;
|
||
|
int main()
|
||
|
{
|
||
|
double n,m,a1,a2,t,i;
|
||
|
while(cin>>n>>m,n,m)
|
||
|
{
|
||
|
for(i=0;i<m;i++)
|
||
|
{
|
||
|
a1=m/i-(i-1)/2;
|
||
|
if(a1<1) break;
|
||
|
}
|
||
|
for(t=i-1;t>=0;t--)
|
||
|
{
|
||
|
a1=m/t-(t-1)/2;
|
||
|
if(a1-(int)a1==0.0) cout<<"["<<(int)a1<<","<<(int)a1+(int)t-1<<"]"<<endl;
|
||
|
}
|
||
|
cout<<endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|