Search found 1 match

by hafezhafez2008
Mon Nov 03, 2008 6:14 pm
Forum: Volume 9 (900-999)
Topic: 974 - Kaprekar Numbers
Replies: 32
Views: 15629

Re: 974 - Kaprekar Numbers

WHY T.L.E
#include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;

int main()
{

int s[1000];
long long int a,b,u,sum;
long long int z;
int t;
cin>>t;
int c=1,x=0;
while(x<t)
{

cin>>a>>b;
int j=0;

for(long long i=a;i<=b;i++)
{
u=0;
sum=0;
z=i*i;
while(z!=0)
{
z ...

Go to advanced search