Search found 2 matches

by shafin_ohin
Thu Jan 08, 2015 1:47 pm
Forum: Volume 105 (10500-10599)
Topic: 10591 - Happy Number
Replies: 61
Views: 21377

Re: 10591 - Happy Number

Why RE?? #include<iostream> #include<cstdio> using namespace std; long long int sds(long long int a) { long long int sum=0; while(a!=0) { sum+=(a%10)*(a%10); a/=10; } return(sum); } int main() { long long int x,c,temp,n=0,uh=0,k=1,ara[100000],i=0; scanf("%lld",&c); long long int tmp=c; for(int h=0;h...
by shafin_ohin
Tue Jan 06, 2015 8:18 pm
Forum: Volume 117 (11700-11799)
Topic: 11777 - Automate the Grades
Replies: 32
Views: 6294

Re: 11777 - Automate the Grades

Why WA?? #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main() { long int t1,t2,f,a,ct1,ct2,ct3,t,sum=0,i,k=1; cin>>t; while(t--) { cin>>t1>>t2>>f>>a>>ct1>>ct2>>ct3; sum=t1+t2+f+a; if(ct1==ct2&&ct2==ct3) sum+=(ct1+ct2)/2; else { if(ct1>ct2&&ct1>ct3&&ct2>ct3) sum+=(c...

Go to advanced search