acesup[n_,S_,numiter_]:=Module[{},
(*n,S variables*)
(*n is number of cards in a suit,can't use C or N as variable in Mathematica*)
(*S is the number of suits*)
(*for this problem only care about suits of cards,not numbers*)(*only care about the suit of the cards;creates a deck of S suits with n cards in each suit*)
(*have suites 1, 10, 100, 1000 and so on so can easily tell if one of each*)
deck={};
For[i=1,i≤n,i++, (* this goes through each of the possible numbers *)
For[s=1,s≤S,s++, (* this goes through each possible suit *)
deck=AppendTo[deck,10^(s-1)]]];

maxsum = Sum[10^(s-1),{s,1,S}]; 
(* this is the value of a hand of S cards, 1 in each suit *)
(* only way to sum to 111...111 is if one of each suit! *)
success = 0; (* initialize number of successes to 0 *)

(* now the main loop, randomly checking s cards numiter times *)
For[i = 1, i ≤ numiter, i++,
{
(* prints an update every time do 10% *)
If[Mod[i,numiter/10] == 0, Print["Have done ", 100.0 i/numiter, "%."]];
hand = RandomSample[deck, S]; (* randomly chooses S cards from deck *)
If[Sum[hand[[i]],{i,1,S}] == maxsum, success = success+1];
(* if the hand has S different suits increase success by 1 *)
}]; (* end of i loop *)

Print["Observed Percent of time last ", S, " same suit is ",100.0  success/numiter, "%."];
Print["Theoretical Percent of time last ", S, " same suit is ",100.0  n^S / Binomial[S n, S], "%."];
]; (* end of module *)
Timing[acesup[13,4,10000000]]

Timing[acesup[13,4,1000000000]]