« first day (2563 days earlier)      last day (825 days later) » 

11:11 AM
1
Q: Finding IntegerPartitions[252] with no zero and no duplicates

J.W.L. Jan EerlandWell, I am trying to execute the following code: Clear["Global`*"]; n = 252; k = 7; f[x_] := Select[Min[Counts[Flatten@x] /@ #] > 1 &]@x; f@Select[DuplicateFreeQ[#] && FreeQ[#, 0] &]@IntegerPartitions[n, {k}] Which finds the IntegerPartitions[252] (and there are $269232701252579$ partitions for ...

 
 
5 hours later…
4:11 PM
6
Q: An 8th grade contest-math puzzle

Sayan DuttaIn a competitive sort of exam, the following question was aimed at 8th graders and above- Sophie had written the numbers 1 to 22 in the 22 discs in the figure, but Adelaide, her big annoying sister, erased fourteen. Find the positions of the numbers erased knowing that Each number written in t...

 
 
2 hours later…
6:10 PM
7
Q: Can template partial specialization narrow the argument type in C++?

FedorIn the next program, struct template A<int> has a specialization A<char>: template <int> struct A { constexpr operator int() { return 1; } }; template <char c> struct A<c> { constexpr operator int() { return 2; } }; int main() { static_assert( A<1000>{} == 1 ); //ok in Clang and GCC sta...

 

« first day (2563 days earlier)      last day (825 days later) »