Search found 5 matches

by etameem
Mon Nov 09, 2009 11:51 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 51177

Re: 371"Ackermann Functions "

here is my code:



#include <iostream>

using namespace std;

int main()
{

int count=0,max=0,temp;
long int i,j,k,p,gen=0;

while(scanf("%ld %ld",&i,&j)==2)
{
if(i==0&&j==0)
break;

if(i>j)
{temp=i;
i=j;
j=temp;


}

max=0;
gen=0;

for (k=i;k<=j;k++)
{
p=k;
while (p!=1)
{
if (p%2==0 ...
by etameem
Tue Aug 25, 2009 3:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 69675

Re: 10062 - Tell Me the Frequencies!

yes. i know about uvatoolkit.com and i have checked some input there. but can't find any difference between my output and uvatoolkit.com output. but then why i am getting WA ???
by etameem
Mon Aug 24, 2009 4:52 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 69675

Re: 10062 - Tell Me the Frequencies!

this is my code:


#include <iostream>

using namespace std;

int main()
{
string a;
char b[200];

int c,d,i,j,k,array[1000],l=0,count[1000],count2[1000],array2[1000],q=0,u,y,temp,temp2;

while(cin>>a)

{q=0;

for(i=0;a[i]!='\0';i++)
{
array[i]=a[i];

}

for(y=0;y<i;y++)
for(u=0;u<i-1;u++)
{
if ...
by etameem
Wed Aug 12, 2009 10:37 am
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 35388

Re: 382 WA

this is my code now...


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
int n,a,b,i,j=0,k,count=1;

while( cin>>n)

{
count=1;
if(j==0)
cout<<"PERFECTION OUTPUT"<<endl;
if(n==0)
{
cout<<"END OF OUTPUT"<<endl;
break;

}
for(i=2;i<=n/2;i++)
{
if(n%i==0)
count ...
by etameem
Thu Aug 06, 2009 10:04 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 35388

Re: 382 WA


#include <iostream>
using namespace std;

int main()
{
int n,a,b,i,j=0,k,count=1;

while( cin>>n)

{
count=1;
if(j==0)
cout<<"PERFECTION OUTPUT"<<endl;
if(n==0)
{
cout<<"END OF OUTPUT"<<endl;
break;

}
for(i=2;i<=n/2;i++)
{
if(n%i==0)
count=count+i;
else
continue;


}
if(count==n ...

Go to advanced search