#include<cstdio>
#include<cstring>
#define MOD 100000007
using namespace std;
int main()
{
long long s;
while(~scanf("%lld",&s)&&s)
{
int flag=0;
for(long long i=1;i*i*6<s;i++)
{
long long t=s-i*i*6;
if(t%(7*i)==0)
{
long long res=(t/(7*i))%MOD;
printf("Possible Missing Soldiers = %lld\n",res*res*2%MOD);
flag=1;
}
}
if(!flag)
printf("No Solution Possible\n");
printf("\n");
}
}
uva 11490
最新推荐文章于 2017-09-25 20:11:00 发布