Detalii evaluare #50321363

Rezumat problemă

Vi se dau n perechi de numere naturale i j, cu i ≤ j. Pentru fiecare pereche trebuie să aflați suma divizorilor tuturor numerelor din șirul i, i + 1, ..., j.

Detalii

Problema Eratostene0 Operații I/O eratostene0.in/eratostene0.out
Limita timp 0.5 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #50321363 Utilizator Sabin Octavian (Sabin_Octavian)
Fișier eratostene0.cpp Dimensiune 517 B
Data încărcării 04 Aprilie 2024, 14:58 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

eratostene0.cpp:5:14: error: variable 'std::ifstream fin' has initializer but incomplete type
 ifstream  fin("eratostene0.in");

              ^
eratostene0.cpp:6:14: error: variable 'std::ofstream fout' has initializer but incomplete type
 ofstream fout("eratostene0.out");

              ^
eratostene0.cpp: In function 'int main()':
eratostene0.cpp:2:12: error: expected identifier before numeric constant
 #define N [1000000]

            ^
eratostene0.cpp:14:22: note: in expansion of macro 'N'
     for (i = 1; i <= N; i++)

                      ^
eratostene0.cpp: In lambda function:
eratostene0.cpp:14:23: error: expected '{' before ';' token
     for (i = 1; i <= N; i++)

                       ^
eratostene0.cpp: In function 'int main()':
eratostene0.cpp:14:19: error: no match for 'operator<=' (operand types are 'int' and 'main()::__lambda0')
     for (i = 1; i <= N; i++)

                   ^
eratostene0.cpp:14:19: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note: template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note: template<class _Iterator> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<=(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<=(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<=(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template<class _Iterator> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<=(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
     for (i = 1; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:14:23: note:   mismatched types 'const _CharT*' and 'int'
     for (i = 1; i <= N; i++)

                       ^
eratostene0.cpp:2:12: error: expected identifier before numeric constant
 #define N [1000000]

            ^
eratostene0.cpp:15:26: note: in expansion of macro 'N'
         for (j = i; j <= N; j += i)

                          ^
eratostene0.cpp: In lambda function:
eratostene0.cpp:15:27: error: expected '{' before ';' token
         for (j = i; j <= N; j += i)

                           ^
eratostene0.cpp: In function 'int main()':
eratostene0.cpp:15:23: error: no match for 'operator<=' (operand types are 'int' and 'main()::__lambda1')
         for (j = i; j <= N; j += i)

                       ^
eratostene0.cpp:15:23: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note: template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note: template<class _Iterator> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<=(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<=(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<=(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template<class _Iterator> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<=(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
         for (j = i; j <= N; j += i)

                           ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:15:27: note:   mismatched types 'const _CharT*' and 'int'
         for (j = i; j <= N; j += i)

                           ^
eratostene0.cpp:2:12: error: expected identifier before numeric constant
 #define N [1000000]

            ^
eratostene0.cpp:17:22: note: in expansion of macro 'N'
     for (i = 2; i <= N; i++)

                      ^
eratostene0.cpp: In lambda function:
eratostene0.cpp:17:23: error: expected '{' before ';' token
     for (i = 2; i <= N; i++)

                       ^
eratostene0.cpp: In function 'int main()':
eratostene0.cpp:17:19: error: no match for 'operator<=' (operand types are 'int' and 'main()::__lambda2')
     for (i = 2; i <= N; i++)

                   ^
eratostene0.cpp:17:19: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note: template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:239:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note: template<class _Iterator> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<=(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:315:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<=(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:365:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<=(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1067:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/bits/char_traits.h:39,
                 from /usr/include/c++/4.8/ios:40,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note: template<class _Iterator> bool std::operator<=(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<=(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1073:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::move_iterator<_Iterator>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2643:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2655:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
     for (i = 2; i <= N; i++)

                       ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8/bits/ios_base.h:41,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/ostream:38,
                 from /usr/include/c++/4.8/iostream:39,
                 from eratostene0.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<=(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2667:5: note:   template argument deduction/substitution failed:
eratostene0.cpp:17:23: note:   mismatched types 'const _CharT*' and 'int'
     for (i = 2; i <= N; i++)

                       ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Eratostene0 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.