Search found 3 matches

by SS_HASAN
Wed Feb 04, 2015 9:24 am
Forum: Volume 102 (10200-10299)
Topic: 10233 - Dermuba Triangle
Replies: 10
Views: 8111

Re: 10233 - Dermuba Triangle

brianfry713 Thank you so much. My grateful gratitude to you (y)
by SS_HASAN
Fri Jan 30, 2015 2:58 pm
Forum: Volume 102 (10200-10299)
Topic: 10233 - Dermuba Triangle
Replies: 10
Views: 8111

Re: 10233 - Dermuba Triangle

My code gives perfect result to uDebug and the above test cases brianfry mentioned earlier.Still I'm getting WA. Can't figure it out. Please help me. :cry:
Code Removed after Accepted :)
by SS_HASAN
Mon Jun 13, 2011 6:49 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101802

Re: 10035 - Primary Arithmetic

#include<stdio.h>

int main()
{
long long m, n;
int sum, count, carry;


while(scanf("%I64d %I64d",&m,&n))
{
if(!m && !n) break;

count = 0;
sum = 0;
carry = 0;

for( ; m != 0 || n != 0; m /= 10, n /= 10)
{
sum = (m % 10) + (n % 10) + carry;

carry = 0;

if(sum > 9)
{
carry = 1 ...

Go to advanced search