title: Google KickStart question displaying "WA" even after giving correct outputs
body: <p>Problem</p>
  
  <p>There are N houses for sale. The i-th house costs Ai dollars to buy. You have a budget of B dollars to spend.</p>
  
  <p>What is the maximum number of houses you can buy?</p>
  
  <p>Input
  The first line of the input gives the number of test cases, T. T test cases follow. Each test case begins with a single line containing the two integers N and B. The second line contains N integers. The i-th integer is Ai, the cost of the i-th house.</p>
  
  <p>Output
  For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the maximum number of houses you can buy.</p>
  
  <p>Limits</p>
  
  <ul>
  <li>Time limit: 15 seconds per test set.</li>
  <li>Memory limit: 1GB.</li>
  <li>1 ≤ T ≤ 100.</li>
  <li>1 ≤ B ≤ 105.</li>
  <li>1 ≤ Ai ≤ 1000, for all i.</li>
  </ul>
  
  <p>Test set 1</p>
  
  <ul>
  <li>1 ≤ N ≤ 100.</li>
  </ul>
  
  <p>Test set 2</p>
  
  <ul>
  <li>1 ≤ N ≤ 105.</li>
  </ul>
  
  <p>Sample</p>
  
  <p>Input</p>
  
  <pre><code>3
  4 100
  20 90 40 90
  4 50
  30 30 10 10
  3 300
  999 999 999
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>Case #1: 2
  Case #2: 3
  Case #3: 0
  </code></pre>
  
  <p>This was my first attempt at a google coding problem:</p>
  
  <pre><code>t = int(input())
  arr = []
  for i in range(t):
      inp = input()
      lis = []
      lis = inp.split()
  
      inp1 = input()
      lis1 = []
      lis1 = inp1.split()
  
      total = 0
      number_of_houses = 0
  
      lis2 = sorted(lis1)
  
      for j in range(int(lis[0])):
          total += int(lis2[j])
          if int(lis[1]) &gt;= total:
              number_of_houses += 1
  
      arr.append(number_of_houses)
  for i in range(t):
  print("Case #" + str(i+1) +": " + str(arr[i]))
  </code></pre>
  
  <p>Are there any rules for the way we write our code
  that I should be aware of?</p>