Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Member_16120772

@Member_16120772
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Algorithm Sequence Programming Competition
    M Member_16120772

    Why can we rewrite the original equation into this? n[x]=x^k + c[1]*x^(k-1)+c[2]*x^(k-2)...+c[k] Where does 'd' goes, Why does x^k until x^(k-k) and why replace a(x) with c(x). Sorry for the inconveniences, I just dont understand.

    Algorithms algorithms help tutorial question

  • Algorithm Sequence Programming Competition
    M Member_16120772

    = ((x + a[1]) * (x + a[2]) * (x + a[3]) ... (x + a[k])) / d You do not know the value of d. You do not know the values for a[1] ... a[k]. You only know that each (a[i] ≥ 0) and (d > 0) and you can assume that the product in the numerator is evenly divisible by the integer value d. You can assume that the numerator can be represented by a 32-bit integer. But you know that the formula for n[x] is a polynomial function of degree k and you know the value of k+2 points for this function. Based on this information, you actually have enough information to calculate the next number n[k+3] in the sequence! This is your task. Input The first line will contain a single positive integer by itself that represents the value k. The second line will consist of (k+2) integer values separated from each other by a single space. The values on the second line represent the series n[1] through n[k+2]. The input must be read from standard input. Output The output of program should display a single integer on a line by itself representing the value for n[k+3]. The output must be written to standard output. Sample Input #1 First Line : 1 Second Line : 3 4 5 Output : 6 Sample Input #2 First Line : 2 Second Line : 1 3 6 10 Output : 15 I dont even understand why this problem is solvable when there is an unknown variable(d) and another function in the sequence(a[x]) and how to get the value of n(k+3)

    Algorithms algorithms help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups