|  | 
|  | 
| вернуться в форум | Почему при проверке выбрасывает "Wrong answer"? Послано Ilya  29 ноя 2018 20:32#include <iostream>#include <math.h>
 #include <iomanip>
 
 using namespace std;
 
 int main(int argc, char const *argv[])
 {
 
 long number;
 double sqrts[256];
 
 int k = 0;
 while ( cin >> number )
 {
 sqrts[k] = sqrt(number);
 k++;
 }
 
 for ( int n = k - 1; n > -1; n-- ) {
 cout << fixed << setprecision(4) << sqrts[n] << endl;
 }
 
 return 0;
 }
 
 Edited by author 29.11.2018 20:32
Re: Почему при проверке выбрасывает "Wrong answer"? http://acm.timus.ru/help.aspx?topic=cpp C and C++ programs are compiled on the server with the 32-bit Microsoft Visual C++ 2017 or MinGW GCC 7.1 or Clang 4.0.1.  So sizeof(long)==4. You should run locally/debug programs using 32 bit compiler too.  Btw, why do you think 256 sqrts is enough? How did you estimate it? | 
 | 
|