Spoj Problem solutions

Pages

  • Home
  • Spoj Solution List
  • Spoj Problem Classifier
  • C Programming Examples

spoj problem help tohu

TOHU

#include<iostream>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
double ans;
ans = (3.0/4.0) + (1.0/(2*(n+2)))-(1.0/(2*(n+1)));
printf("%.11f\n",ans);
}
return 0;
}


No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Online Member

Blog Archive

  • ►  2014 (66)
    • ►  October (10)
    • ►  September (46)
    • ►  August (3)
    • ►  April (3)
    • ►  March (2)
    • ►  January (2)
  • ▼  2013 (66)
    • ►  December (21)
    • ►  November (9)
    • ►  October (8)
    • ▼  September (14)
      • MAXLN
      • INVCNT
      • Spoj problem Sphere in a tetrahedron
      • spoj problem help tohu
      • spoj problem will it ever stop(WILLITST)
      • Spoj Problem Histogram(HISTOGRA)
      • Spoj problem Fashion Show(FASHION)
      • Spoj problem Behive Number(BEENUMS)
      • spoj solution of GCD2
      • Spoj solution of Julka(JULKA)
      • Spoj solution of Edit Distance Again(EDIT)
      • Spoj problem Counting triangle
      • Spoj problem SUM1
      • Length fact spoj problem
    • ►  August (14)

About Me

Explore Much
View my complete profile

Search This Blog

Pages

  • Home
Theme images by mammamaart. Powered by Blogger.