Sha256: 546d0d1fa4a1e3c246cca8ab5bd72dc1f860bfc2f74806758de6f0260466197f
Contents?: true
Size: 285 Bytes
Versions: 81
Compression:
Stored size: 285 Bytes
Contents
#include "grains.h" #define NUMBER_OF_SQUARES (64) uint64_t square(uint8_t index) { return (uint64_t) 1 << (index - 1); } uint64_t total(void) { uint64_t result = 0; for (uint8_t i = 1; i <= NUMBER_OF_SQUARES; i++) { result += square(i); } return result; }
Version data entries
81 entries across 81 versions & 1 rubygems