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
from functools import lru_cache | |
def make_E(U): | |
@lru_cache(maxsize=None) | |
def memoized_E(z, t): | |
if z < t: | |
return (1.0 / 6.0) * (U(0) + sum(E(z + i, t) for i in [1, 2, 3, 4, 5])) | |
else: | |
return U(z) | |
def E(z, t): | |
return memoized_E(z, max(z, t)) |
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
{ | |
"locked": false, | |
"version": 1, | |
"targets": { | |
"DNX,Version=v4.5.1": { | |
"Ix-Main/1.2.3": { | |
"type": "package", | |
"frameworkAssemblies": [ | |
"System", | |
"System.Core" |
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
int n = 11; | |
SortedSet<int> F = new SortedSet<int>(); | |
while (true) | |
{ | |
if (!F.Any() || F.Min > n) | |
{ | |
F.Add(n); | |
n *= 11; | |
} | |
else |
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
#include <linqcpp/linq/Enumerable.h> | |
#include <string> | |
#include <functional> | |
#include <iostream> | |
#include <fstream> | |
using namespace std; | |
using namespace linq; |