This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MonteCarlo | |
{ | |
class Program | |
{ | |
private static Random r = new Random(); | |
private static readonly double GestationPeriodMean = 280.6; | |
private static readonly double GestationPeriodStandardDeviation = 9.7; | |
private static readonly int Simulations = 10000000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reactive.Linq; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Akavache; | |
namespace AkavacheQueue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
def _solve(target, numbers): | |
#print 'Solving T=' + str(target) + ': ' + str(numbers) | |
# base case | |
if target in numbers: | |
# solved. | |
print target, | |
return True |