Search found 3 matches

by Sadasidha08
Wed Jun 30, 2010 9:06 pm
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 20168

Re: 424 - Integer Inquiry RE

ur strings length is very small make those 500
by Sadasidha08
Fri Jun 18, 2010 8:24 pm
Forum: Volume 2 (200-299)
Topic: 231 - Testing the CATCHER
Replies: 53
Views: 14544

gettin wa plz some one help

#include<iostream.h> #include<stdlib.h> #define MAX 100000 void swap(long& x,long& y) { int t=x; x=y; y=t; } int max(int x,int y) { if(x>y) return x; else return y; } long arry[MAX][MAX]={0,}; int main() { long ar1[MAX],ar2[MAX]; long n,t=0,i,j,k; while(1) { t++; cin>>n; if(n==-1) break; j=0; while(...
by Sadasidha08
Mon Apr 05, 2010 8:18 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19334

Re: 382 WA

//[c] #include<stdio.h> int main() { long int n; long int i=0,sum; printf("PERFECTION OUTPUT\n"); while(scanf("%ld",&n)) { sum=0; if(n==0) break; for(i=1;i<=n/2;i++) { if((n%i)==0) sum+=i; } if(sum==n) printf("%5ld PERFECT\n",n); else if(sum<n) printf("%5ld DEFICIENT\n",n); else printf("%5ld ABUDANT...

Go to advanced search