We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sherlock and Anagrams
Sherlock and Anagrams
Sort by
recency
|
1700 Discussions
|
Please Login in order to post a comment
import java.io.; import java.util.;
class Result {
}
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
}
Ruby solution:
A short CPP version:
Here's the approch that I implement to solve this problem with Kotlin:
I wanted to use the NCR formula to count permutations, which uses factorials.
100! is a very big number. (9e157)
Luckily c# has the arbitrary System.Numerics.BigInteger