10
Last seen 9 years ago
Member for 10 years, 22 days
Difficulty Normal
Hi all! I'm an Italian student of MSc. in Physics Engineering.
I started programming at University with C, but soon my main tool for "programming" has become MATLAB, since I use it to analyse things I study in the class.
I like programming for 2 reasons: it allows me to implement codes to study physics and it requires me to understand how our mind constructs algorithms.
Thus, I am the kind of programmer (though I can't see myself in this way) that doesn't look for the most compact code, but for the easiest to implement and the most straightforward. Nonetheless, I can appreciate clever solutions and I can see the beauty in them :D
I don't know yet how the site checks the codes - that's why I wrote two functions when only one is necessary actually :D
I was trying to do it in one line only (like using lambda), but I didn't manage, so I'll browse the forum to look for some suggestions :D
Any advice is welcomed!
More
The numbers of pigeons at round n is t(n), where t(n) is the n-th triangolar number (http://en.wikipedia.org/wiki/Triangular_number).
The number of portions of wheat eaten by t(n) pigeons is the sum of the first n triangular numbers, that is T(n), the n-th tetrahedral number (http://en.wikipedia.
More
The idea of substituting letters with "v" and "c" and then using find comes from [RRRQ](http://www.checkio.org/mission/striped-words/publications/RRRQ/python-3/first/), actually, and I implemented it onto my first code :D
More