16 Topics

Member Avatar for
Member Avatar for Tcll

Truthfully it isn't really that special, but it is a bit cancerous as I only have `atan()` and not `atan2()`... What's special about it is every other function I see seems to be intrinsic with 1 axis needing a `sqrt()` to manage singularities, where what I'm looking to achieve is …

Member Avatar for rproffitt
0
296
Member Avatar for Petcheco

Hello, friends. I did the fourth challenge on Project Euler and I'd like to know what I can do to improve the efficiency of my code. Right now it takes 1.562s to run and the source code is as follows: #include <iostream> #include <string.h> using namespace std; int Number = …

Member Avatar for memson
0
411
Member Avatar for laurel.jackson.12

Write a program that prompts the user for a value for i and displays the e value, and this is all i have so far. I was told it's suppose to have two for loops but i'm not sure where and how to do it and i know my output …

Member Avatar for AssertNull
0
3K
Member Avatar for Petcheco

Hey, guys. A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a² + b² = c². For example, 3² + 4² = 9 + 16 = 25 = 5². There exists exactly one Pythagorean triplet for which a + b + c …

Member Avatar for Petcheco
0
345
Member Avatar for Petcheco

Hello, guys. This challenge asks us to find the 10001-th prime. Here's my code: // A reasonable approximation is to say that the n-th prime is such that p(n) = n*(log n + log*(log n) - 1). // With that in mind, we can say that the 10001-th prime is …

Member Avatar for Petcheco
0
252
Member Avatar for Petcheco

Hello, guys. The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450 Find the thirteen adjacent digits …

Member Avatar for Petcheco
0
288
Member Avatar for Petcheco

Hello, guys. Here's the challenge: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? I wrote my code: #include …

Member Avatar for Petcheco
0
318
Member Avatar for bnn678

Not usually one to have to do this, but I cannot find the problem with my code. Yes, this is a project Euler problem. Any tips or suggestions help. My code works by getting the location of each number, excluding the first numbers as it has to be predefined, and …

Member Avatar for scudzilla
0
188
Member Avatar for glao

Hello , I am trying to solve some problems from the "Computer Simulation Methods" book. It says > > Write a class that solves the nuclear decay problem.Input the decay constant l from the control window.For l=1 and dt=0.01 ,compute the difference between the analytical result and the result of …

Member Avatar for glao
0
631
Member Avatar for dixit ankit

I am trying problem 16 from project euler, i want to add a00 integers 50 decimal places each.So i searched and found BigIntegerLibrary, but can't find any good reference material on what are the varoius functions and operators in the library. Please provide me some decent material on how to …

Member Avatar for WaltP
0
151
Member Avatar for grh1107

Currently I'm working on Euler Problem 62, Permutations of a cube, the program is searching for a cube that 5 of the permutations are other cubes, I did some online research and found that the cube that im searching for is within the range of an int64, Actually its 12 …

Member Avatar for grh1107
0
236
Member Avatar for Grovega

Hi, so the exercise I am supposed to do is : "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 …

Member Avatar for Grovega
0
170
Member Avatar for efronefron

I have been racking my brains to find what's wrong with my code... been playing with it for an hour or so but it seems to still be wrong.. Please anyone can point out the mistake? Im so frustated right now.:yawn: the answer to the question is 21124, but this …

Member Avatar for efronefron
0
580
Member Avatar for Thisisnotanid

Hi everyone. I was trying to solve Pb 35 on Project Euler ([url]http://projecteuler.net/index.php?section=problems&id=35[/url]). It essentially asks to write a program to list all circular primes under 1e6. I wrote the program and it works well for the most part. However, in the end it seems not to be able to …

Member Avatar for Thisisnotanid
0
2K
Member Avatar for mrcpp

Hi, I tried doing Project Euler #27 today, which asks the following: [QUOTE] Euler published the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 40^(2) + …

Member Avatar for mrcpp
0
300
Member Avatar for king_koder

I wrote the following function in Python3 for finding the largest product of numbers along the diagonal(top-left to right-bottom). [CODE=python] def GreatestOnDiagonal(data): '''Returns greatest product possible by multiplying 4 numbers in the diagonal ''' grtProduct=1 for item in data: for n in item: product=1 for r in range(0,4): try: d=data.index(item)+r …

Member Avatar for king_koder
0
381

The End.