Detalii evaluare #52152513

Rezumat problemă

Se dau n numere naturale. Pentru fiecare numar x, calculati 1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+...x).

Detalii

Problema SumeGaussDeSumeGauss Operații I/O tastatură/ecran
Limita timp 1.5 secunde Limita memorie Total: 0.1 MB / Stivă 0.1 MB
Id soluție #52152513 Utilizator a b (sal)
Fișier sumegaussdesumegauss.cpp Dimensiune 772 B
Data încărcării 20 Septembrie 2024, 19:33 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

sumegaussdesumegauss.cpp:5:9: error: macro names must be identifiers
 #define 🥱 =

         ^
sumegaussdesumegauss.cpp:6:9: error: macro names must be identifiers
 #define 🤔 >

         ^
sumegaussdesumegauss.cpp:7:9: error: macro names must be identifiers
 #define 😁😁😁😁 <

         ^
sumegaussdesumegauss.cpp:8:9: error: macro names must be identifiers
 #define 😎😎 >>

         ^
sumegaussdesumegauss.cpp:9:9: error: macro names must be identifiers
 #define 😋😋 <<

         ^
sumegaussdesumegauss.cpp:10:9: error: macro names must be identifiers
 #define 😣 <=

         ^
sumegaussdesumegauss.cpp:11:9: error: macro names must be identifiers
 #define 😁 +=

         ^
sumegaussdesumegauss.cpp:12:9: error: macro names must be identifiers
 #define 😃 -=

         ^
sumegaussdesumegauss.cpp:16:5: error: stray '\360' in program
     __ n, x, last 🥱 0, sum 🥱 0;

     ^
sumegaussdesumegauss.cpp:16:5: error: stray '\237' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\245' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\261' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\360' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\237' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\245' in program
sumegaussdesumegauss.cpp:16:5: error: stray '\261' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\360' in program
     _::cin 😎😎 n;

     ^
sumegaussdesumegauss.cpp:17:5: error: stray '\237' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\230' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\216' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\360' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\237' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\230' in program
sumegaussdesumegauss.cpp:17:5: error: stray '\216' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\360' in program
         _::cin 😎😎 x;

         ^
sumegaussdesumegauss.cpp:20:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\216' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:20:9: error: stray '\216' in program
sumegaussdesumegauss.cpp:22:9: error: stray '\360' in program
         if (x 🤔 last) {

         ^
sumegaussdesumegauss.cpp:22:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:22:9: error: stray '\244' in program
sumegaussdesumegauss.cpp:22:9: error: stray '\224' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\360' in program
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

             ^
sumegaussdesumegauss.cpp:23:13: error: stray '\237' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\245' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\261' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\360' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\237' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\230' in program
sumegaussdesumegauss.cpp:23:13: error: stray '\243' in program
sumegaussdesumegauss.cpp:24:17: error: stray '\360' in program
                 sum 😁 i * (i+1) / 2;

                 ^
sumegaussdesumegauss.cpp:24:17: error: stray '\237' in program
sumegaussdesumegauss.cpp:24:17: error: stray '\230' in program
sumegaussdesumegauss.cpp:24:17: error: stray '\201' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\360' in program
         } else if (x 😁😁😁😁 last) {

         ^
sumegaussdesumegauss.cpp:26:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\201' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\201' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\201' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:26:9: error: stray '\201' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\360' in program
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

             ^
sumegaussdesumegauss.cpp:27:13: error: stray '\237' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\245' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\261' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\360' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\237' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\244' in program
sumegaussdesumegauss.cpp:27:13: error: stray '\224' in program
sumegaussdesumegauss.cpp:28:17: error: stray '\360' in program
                 sum 😃 i * (i+1) / 2;

                 ^
sumegaussdesumegauss.cpp:28:17: error: stray '\237' in program
sumegaussdesumegauss.cpp:28:17: error: stray '\230' in program
sumegaussdesumegauss.cpp:28:17: error: stray '\203' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\360' in program
         _::cout 😋😋 sum 😋😋 " ";

         ^
sumegaussdesumegauss.cpp:32:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\213' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\213' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\213' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\360' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\230' in program
sumegaussdesumegauss.cpp:32:9: error: stray '\213' in program
sumegaussdesumegauss.cpp:33:9: error: stray '\360' in program
         last 🥱 x;

         ^
sumegaussdesumegauss.cpp:33:9: error: stray '\237' in program
sumegaussdesumegauss.cpp:33:9: error: stray '\245' in program
sumegaussdesumegauss.cpp:33:9: error: stray '\261' in program
sumegaussdesumegauss.cpp: In function 'int main()':
sumegaussdesumegauss.cpp:16:24: error: expected initializer before numeric constant
     __ n, x, last 🥱 0, sum 🥱 0;

                        ^
sumegaussdesumegauss.cpp:17:21: error: expected ';' before 'n'
     _::cin 😎😎 n;

                     ^
sumegaussdesumegauss.cpp:17:22: warning: statement has no effect [-Wunused-value]
     _::cin 😎😎 n;

                      ^
sumegaussdesumegauss.cpp:20:25: error: expected ';' before 'x'
         _::cin 😎😎 x;

                         ^
sumegaussdesumegauss.cpp:20:26: warning: statement has no effect [-Wunused-value]
         _::cin 😎😎 x;

                          ^
sumegaussdesumegauss.cpp:22:20: error: expected ')' before 'last'
         if (x 🤔 last) {

                    ^
sumegaussdesumegauss.cpp:23:34: error: expected ';' before 'last'
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                  ^
sumegaussdesumegauss.cpp:23:34: error: 'last' was not declared in this scope
sumegaussdesumegauss.cpp:23:44: warning: for increment expression has no effect [-Wunused-value]
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                            ^
sumegaussdesumegauss.cpp:23:51: error: expected ')' before 'x'
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                                   ^
sumegaussdesumegauss.cpp:23:52: warning: statement has no effect [-Wunused-value]
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                                    ^
sumegaussdesumegauss.cpp:23:54: error: 'i' was not declared in this scope
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                                      ^
sumegaussdesumegauss.cpp:23:57: error: expected ';' before ')' token
             for (uint64_t i 🥱 last + 1; i 😣 x; i++) {

                                                         ^
sumegaussdesumegauss.cpp:26:39: error: expected ')' before 'last'
         } else if (x 😁😁😁😁 last) {

                                       ^
sumegaussdesumegauss.cpp:27:34: error: expected ';' before 'last'
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                  ^
sumegaussdesumegauss.cpp:27:34: error: 'last' was not declared in this scope
sumegaussdesumegauss.cpp:27:40: warning: for increment expression has no effect [-Wunused-value]
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                        ^
sumegaussdesumegauss.cpp:27:47: error: expected ')' before 'x'
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                               ^
sumegaussdesumegauss.cpp:27:48: warning: statement has no effect [-Wunused-value]
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                                ^
sumegaussdesumegauss.cpp:27:50: error: 'i' was not declared in this scope
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                                  ^
sumegaussdesumegauss.cpp:27:53: error: expected ';' before ')' token
             for (uint64_t i 🥱 last; i 🤔 x; i--) {

                                                     ^
sumegaussdesumegauss.cpp:32:26: error: expected ';' before 'sum'
         _::cout 😋😋 sum 😋😋 " ";

                          ^
sumegaussdesumegauss.cpp:32:42: warning: statement has no effect [-Wunused-value]
         _::cout 😋😋 sum 😋😋 " ";

                                          ^
sumegaussdesumegauss.cpp:33:9: error: 'last' was not declared in this scope
         last 🥱 x;

         ^
sumegaussdesumegauss.cpp:33:19: error: expected ';' before 'x'
         last 🥱 x;

                   ^

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 SumeGaussDeSumeGauss 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ă.