+0  
 
0
96
3
avatar

Two positive integers sum up to 2247. When their digits are reversed, they sum up to 4353. How many such pairs are there? Thanks.

 Feb 2, 2021
 #1
avatar+1764 
0

Hi Guest!

 

To solve this question, you can use case work. :))

 

4 digit plus 1 digit

abcd + e = 2247

*note abcd is written as 1000a + 100b + 10c + d. 

dcba + e = 4353

 

4 digit plus 2 digit

abcd + ef = 2247

dcba + fe = 4353

 

4 digit plus 3 digit

abcd + efg = 2247

dcba + gfe = 4353

 

4 digit plus 4 digit

abcd + efgh = 2247

dcba + hgfe = 4353

 

Try solving these cases by yourself. I wish you best of luck. :)))

If you need help, feel free to respond and I'll try to help more. 

 

=^._.^=

 Feb 2, 2021
 #2
avatar
0

a=2247;b=1;e=a-b;if(e+b==a, goto cycle1, 0);cycle1:c=e;d=b;i=int(log(c));j=int(log(d));

;s=0;p=0;cycle: s=(c%10);p=p+(s*10^i);c=(c div 10);i--;if(c!=0, goto cycle,0);r=0;t=0;cycle2: r=(d%10);t=t+(r*10^j);d=(d div 10);j--;if(d!=0, goto cycle2,0);if(p+t==4353, goto end,goto next);end:printe,"+",b,"=",e+b;printp,"+",t,"=",p+t;print;next:e=e-1;b=b+1;if(b<=a/2, goto3, discard=0;

 

2234 + 13 = 2247
4322 + 31 = 4353

 

2104 + 143 = 2247
4012 + 341 = 4353

 

2093 + 154 = 2247
3902 + 451 = 4353

 

1983 + 264 = 2247
3891 + 462 = 4353

 Feb 2, 2021
 #3
avatar+1764 
0

Nice job guest! :)))

 

=^._.^=

catmg  Feb 3, 2021

27 Online Users

avatar
avatar
avatar
avatar
avatar