#327
AfisareNumere
Se dă un număr natural n
. Afișați în ordine crescătoare primele n
numere naturale nenule.
Problema | AfisareNumere | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57912922 | Utilizator | |
Fișier | afisarenumere.cpp | Dimensiune | 1.29 KB |
Data încărcării | 30 Aprilie 2025, 14:23 | Scor / rezultat | Eroare de compilare |
afisarenumere.cpp: In function 'int main()': afisarenumere.cpp:38:70: error: no matching function for call to 'regex_replace(std::string&, std::regex&, const char [5])' std::string new_s = std::regex_replace(s, long_word_regex, "[$&]"); ^ afisarenumere.cpp:38:70: note: candidates are: In file included from /usr/include/c++/4.8/regex:62:0, from afisarenumere.cpp:4: /usr/include/c++/4.8/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, ^ /usr/include/c++/4.8/bits/regex.h:2162:5: note: template argument deduction/substitution failed: afisarenumere.cpp:38:70: note: deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex<char>' and 'const char*') std::string new_s = std::regex_replace(s, long_word_regex, "[$&]"); ^ In file included from /usr/include/c++/4.8/regex:62:0, from afisarenumere.cpp:4: /usr/include/c++/4.8/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(const basic_string<_Ch_type>& __s, ^ /usr/include/c++/4.8/bits/regex.h:2182:5: note: template argument deduction/substitution failed: afisarenumere.cpp:38:70: note: mismatched types 'const std::basic_string<_Ch_type>' and 'const char [5]' std::string new_s = std::regex_replace(s, long_word_regex, "[$&]"); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisareNumere face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.