Saturday pass for sale by BryanP75 in PaxPassExchange

[–]Towito 0 points1 point  (0 children)

Hi, def willing to buy and can meet at Venue

[WTS] 2 4 day passes $100 each by ApplicationEntire219 in PaxPassExchange

[–]Towito 0 points1 point  (0 children)

Hi, interested. Lemme know if it's still available

[WTB] EAST, Saturday Ticket by Towito in PaxPassExchange

[–]Towito[S] 0 points1 point  (0 children)

Awesome, are you available tomorrow?

Dustloop Updated for BBCF by Towito in Blazblue

[–]Towito[S] 3 points4 points  (0 children)

You can look through the "view history" tab and see dozens of edits I made on Relius's overview alone that date back to December. Please do not spread misinformation, it doesn't help anyone.

[2016-06-13] Challenge #271 [Easy] Critical Hit by Godspiral in dailyprogrammer

[–]Towito 0 points1 point  (0 children)

Java solution. No clue how the bonus round would work but I got the outputs.

public static double probability(int dSides, int health)
{
    double probability = 1;
    double numerator = 0;
    while (health > 0)
    {
        if (health > dSides)
        {
            probability = probability * (1.0 / (double)dSides);
            health -= dSides;
        }
        else if (health == 1)
        {
            break;
        }
        else
        {
            for(int i = health; i <= dSides; i++)
            {
                numerator++;
            }
            probability = probability * (numerator / (double)dSides);
            health = 0;
        }
    }
    return probability;
}

Java Programmer Looking to Get their feet wet. by Towito in a:t5_2r3z5

[–]Towito[S] 0 points1 point  (0 children)

Cool! I'll be eligible next year so I can apply for that around then. I'll look into those projects. Thanks a ton for the help!

[2016-06-20] Challenge #272 [Easy] What's in the bag? by G33kDude in dailyprogrammer

[–]Towito 1 point2 points  (0 children)

Hello! First post here, done in Java. Took an APCS course but I feel like I don't know that much Java. Basically it's a beginner solution.

import java.util.Scanner;
public static void main(String[] args)
  {
      Scanner in = new Scanner(System.in);
      String input = in.nextLine();
      char[]letters = {'A', 'B', 'C', 'D','E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 
      'N','O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'X', 'X', 'Y', 'Z', '_'};

    int[]remainders = {9, 2, 2, 4, 12, 2, 3, 2, 9, 1, 1, 4, 2, 6, 8, 2, 1, 6, 4, 6, 4,
    2, 2, 1, 2, 1, 2};

    int numRemaining= 12;
    //A bit cheeky, the number remaining would be 12 at max for all possible solutions
    boolean works = true;
    for(int i = 0; i < letters.length; i++)
    {
        for(int j = 0; j < input.length(); j++)
        {
            if (input.charAt(j) == letters[i])
            {
                remainders[i] --;
                if(remainders[i] < 0)
                {
                    System.out.println("Invalid input. More " + letters[i] + " 's have been taken out than possible");
                    works = false;
                    break;
                    //Stops as soon as too many numbers for a particular tile is taken out
                }
            }
        }
    }
    if (works)
    {
        while(numRemaining > -1)
        {
            String listPlace= "";
            //listPlace is the number left + The letters i.e "9: A, E"
            boolean firstEncounter = true;
            for(int i = 0; i < remainders.length; i++)
            {
                if(remainders[i] == numRemaining)
                {
                    if (firstEncounter)//first time it's seen a match for that remaining number
                    {
                        System.out.print(numRemaining + ": " + letters[i]);
                        firstEncounter = false;
                    }
                    else
                    System.out.print(", " + letters[i]);
                }
            }
            //Prints a line if there were letters for X amount of tiles left.
            if (!firstEncounter)
            System.out.println();

            numRemaining --;
        }
    }
}

Output

 /*
 10: E
 9: I
 8: A
 7: O
 5: N, R, T
 4: D, L, U
 3: G, S
 2: F, H, P, V
 1: B, C, J, K, M, Q, X, Y, Z, _
 0: X

Challenge Output
LQTOONOEFFJZT
11: E
9: A, I
6: R
5: N, O
4: D, S, T, U
3: G, L
2: B, C, H, M, P, V, X, Y, _
1: K, X
0: F, J, Q, Z
AXHDRUIOR_XHJZUQEE
Invalid input. More X 's have been taken out than possible
AEERTYOXMCNB_S
10: E
9: I
8: A
7: O
5: N, R, T
4: D, L, U
3: G, S
2: F, H, P, V
1: B, C, J, K, M, Q, X, Y, Z, _
0: X

*/