From: Neil Smith Date: Sat, 4 Mar 2017 22:05:01 +0000 (+0000) Subject: Started on puzzle 44 X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;ds=sidebyside;h=8b124805412f85a943ad7d39b03a5de24e5cf54b;p=project-euler.git Started on puzzle 44 --- diff --git a/euler44.ipynb b/euler44.ipynb new file mode 100644 index 0000000..df13e12 --- /dev/null +++ b/euler44.ipynb @@ -0,0 +1,52 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + ":pentagonal" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def pentagonal(n)\n", + " n * (3 * n - 1) / 2\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Ruby 2.4.0", + "language": "ruby", + "name": "ruby" + }, + "language_info": { + "file_extension": ".rb", + "mimetype": "application/x-ruby", + "name": "ruby", + "version": "2.4.0" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}