#4032
Zar1
În câte moduri se poate obține suma n
aruncând cu zarul (În câte moduri poți să îl scrii pe n
ca sumă de valori mai mici sau egale cu 6
).
Problema | Zar1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 0.5 MB
/
Stivă 0.5 MB
|
Id soluție | #44163972 | Utilizator | |
Fișier | zar1.cpp | Dimensiune | 2.10 KB |
Data încărcării | 04 Iulie 2023, 16:45 | Scor / rezultat | 40 puncte |
zar1.cpp: In function 'void LogPowMat(long long unsigned int, long long unsigned int (*)[6])': zar1.cpp:12:17: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:12:20: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:12:27: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:12:30: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:13:16: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:13:19: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:23:29: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:32: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:40: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:43: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:49: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:52: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:60: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:23:63: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(I[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:27:24: warning: array subscript has type 'char' [-Wchar-subscripts] I[i][j]=Mat[i][j]; ^ zar1.cpp:27:27: warning: array subscript has type 'char' [-Wchar-subscripts] I[i][j]=Mat[i][j]; ^ zar1.cpp:27:34: warning: array subscript has type 'char' [-Wchar-subscripts] I[i][j]=Mat[i][j]; ^ zar1.cpp:27:37: warning: array subscript has type 'char' [-Wchar-subscripts] I[i][j]=Mat[i][j]; ^ zar1.cpp:28:26: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:28:29: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:35:26: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:29: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:37: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:40: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:49: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:52: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:60: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:35:63: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=(Mat[i][j]+(PMat[i][k]*PMat[k][j])%Mod)%Mod; ^ zar1.cpp:39:23: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:39:26: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:39:33: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:39:36: warning: array subscript has type 'char' [-Wchar-subscripts] PMat[i][j]=Mat[i][j]; ^ zar1.cpp:40:22: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:40:25: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=0; ^ zar1.cpp:47:18: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=I[i][j]; ^ zar1.cpp:47:21: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=I[i][j]; ^ zar1.cpp:47:26: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=I[i][j]; ^ zar1.cpp:47:29: warning: array subscript has type 'char' [-Wchar-subscripts] Mat[i][j]=I[i][j]; ^ zar1.cpp: In function 'int main()': zar1.cpp:71:24: warning: unused variable 'rez' [-Wunused-variable] unsigned long long rez=0; ^ zar1.cpp:68:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%llu",&n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | Exemplu | |
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 40 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Zar1 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ă.