Jump to content
BrainDen.com - Brain Teasers

sushma

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0

About sushma

  • Rank
    Newbie
  1. Riddle of Kings

    The true King lives in yellow castle.
  2. A bug problem

    int no_of_happy_bug(int gen) { int happy = 1; int sad = 0; int neutral = 0; int generation = 1; while (generation <= gen) { int h = 0; int s = 0; int n = 0; if (happy >= 1) { s = s + happy; n = n + happy; } if (sad >= 1) { h = h + (2 * sad); } if (neutral >= 1) { h = h + neutral; s = s + neutral; } happy = h; sad = s; neutral = n; generation++; } return happy; }
  3. choosing a leader

    Group member : (A D G K) (B F I L) (C E J H) disqualified vote is 2nd one he is voting to [A, C, G] where A & G belongs to same group.
  4. All primes

    2 5 and 7
  5. Who is wrong ?

    statement given by jemmy : b*b + c*c = (a+b)^2 is incorrect. initially lets assume that Leon's statement is correct : a*b*c = 12 * c That means a * b = 12 which means there are following possible values of a & b a = 6 b = 2 or a = 2 b = 6 or a = 4 b = 3 or a = 3 b = 4 now take a = 6 and b = 2 then from Claudy's statement 2*a*b = c + 2*b => c = 20 and on using Thomas's statement : 30*d = 6*b*c => d = 8 and Richard's statement : a+b+c+d = a*a => 6 + 2 + 20 + 8 = 6 * 6 => 36 = 36 only Jemmy's statement : b*b + c*c = (a+b)^2 is not satisfying this values. so jemmy's statement is incorrect.
  6. Number of kids

    350 kids number of kids should like : kids %7 should be 0 (kids - 2) %6 should be 0 (kids - 5) % 5 should be 0 (kids - 10) % 4 should be 0 (kids - 17) % 3 should be 0
×