ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

1263 Elections - am I that stupid?
Posted by Paul Diac 30 Mar 2004 12:02
I know to make the problem, but y got a wrong answer.
I don't know how to write with 2 decimals. I tryed in C and C++ - fprintf("%f.2",v[i]); setprecision(4) -. But it dosen't worck. Shall I try in Pascal? :)
Re: 1263 Elections - am I that stupid?
Posted by Problemset Maintainer 30 Mar 2004 12:39
try this:
  printf("%.2f", x); //for float
  printf("%.2lf", x); //for double
  printf("%.2Lf", x); //for long double
Re: 1263 Elections - am I that stupid?
Posted by gufy 30 Mar 2004 20:11
Pascal variant is
writeln(x:0:2);