#280
PalMax
Se dau mai multe numere naturale. Determinaţi cel mai mare număr palindrom aflat printre numerele date şi de câte ori apare.
Problema | PalMax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43762998 | Utilizator | |
Fișier | palmax.cpp | Dimensiune | 1.14 KB |
Data încărcării | 15 Mai 2023, 09:28 | Scor / rezultat | Eroare de compilare |
palmax.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ palmax.cpp:1:7: error: 'System' has not been declared palmax.cpp:7:26: error: 'string' has not been declared static void Main(string[] args) ^ palmax.cpp:7:35: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ palmax.cpp:42:5: error: expected ';' after class definition } ^ palmax.cpp: In static member function 'static void Cifre::Program::Main(int*)': palmax.cpp:9:16: error: expected unqualified-id before '[' token int[] a = new int[100000]; ^ palmax.cpp:12:17: error: expected primary-expression before 'int' n = int.Parse(Console.ReadLine()); ^ palmax.cpp:12:17: error: expected ';' before 'int' palmax.cpp:13:13: error: 'string' was not declared in this scope string linie = Console.ReadLine(); ^ palmax.cpp:13:20: error: expected ';' before 'linie' string linie = Console.ReadLine(); ^ palmax.cpp:14:20: error: expected primary-expression before ']' token string[] s = linie.Split(' '); ^ palmax.cpp:14:22: error: expected ';' before 's' string[] s = linie.Split(' '); ^ palmax.cpp:15:29: error: expected ')' before 'nr' foreach (string nr in s) ^ palmax.cpp:15:36: error: 'foreach' was not declared in this scope foreach (string nr in s) ^ palmax.cpp:16:17: error: expected ';' before 'a' a[++i] = int.Parse(nr); ^ palmax.cpp:17:20: error: 'a' was not declared in this scope temp = a[i]; ^ palmax.cpp:32:22: error: 'Console' was not declared in this scope Console.Write("NUMARUL ESTE PALINDROM" + a[i] + " "); ^ palmax.cpp:34:22: error: 'Console' was not declared in this scope Console.Write("numarul nu este"); ^ palmax.cpp:10:27: warning: unused variable 'minim' [-Wunused-variable] int n, i = 0, minim = 1000000, maxim = 0, min = 0, max = 0; ^ palmax.cpp:10:44: warning: unused variable 'maxim' [-Wunused-variable] int n, i = 0, minim = 1000000, maxim = 0, min = 0, max = 0; ^ palmax.cpp:10:55: warning: unused variable 'min' [-Wunused-variable] int n, i = 0, minim = 1000000, maxim = 0, min = 0, max = 0; ^ palmax.cpp:10:64: warning: unused variable 'max' [-Wunused-variable] int n, i = 0, minim = 1000000, maxim = 0, min = 0, max = 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PalMax 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ă.