#3807
SumeGaussDeSumeGauss
Se dau n
numere naturale. Pentru fiecare numar x
, calculati 1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+...x)
.
matematică
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 | |
Fișier | sumegaussdesumegauss.cpp | Dimensiune | 772 B |
Data încărcării | 20 Septembrie 2024, 19:33 | Scor / rezultat | Eroare de 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; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumeGaussDeSumeGauss 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ă.