You are not logged in. Please login at www.codechef.com to post your questions!

×

need help in spoj TRICOUNT2 problem

can anybody please see why i am getting wrong answer in the spoj counting triangles II problem


link for problem:http://www.spoj.com/problems/TCOUNT2/


my solution in c http://ideone.com/gtdCUY


my solution in pascal http://ideone.com/O0kW1o


asked 27 Sep '13, 15:08

nitish1402's gravatar image

3★nitish1402
31115
accept rate: 0%

edited 27 Sep '13, 15:09


The correct formula for this problem is : (n(n+2)(2n+1))/8

link

answered 04 Jul '14, 18:26

bug2312's gravatar image

3★bug2312
31626
accept rate: 12%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×849

question asked: 27 Sep '13, 15:08

question was seen: 3,898 times

last updated: 04 Jul '14, 18:26