Borderou de evaluare (job #2023775)

Utilizator andreicoman299Coman Andrei andreicoman299 Data 19 septembrie 2017 14:26:54
Problema Nunta Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:2:88: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] char F[2][201];int main(){FILE*fi;fi=fopen("nunta.in","r");short n;fscanf(fi,"%hd", &n);fclose(fi);fi=fopen("nunta.out","w");if(n == 1){fprintf(fi,"1");return 0;}F[0][1] = 1;F[1][1] = 2;unsigned char i, t;short j;for(j = 3; j <= n; j++){t = 0;for(i = 1; i <= 199 || t; i++, t/=10)F[1 - j % 2][i] = (t += F[0][i] + F[1][i]) % 10;}i = 199;while(F[1 - n % 2][i] == 0) i--;while(i > 0)fputc(F[1 - n % 2][i--] + '0', fi);return 0;} ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms248kbOK10
20ms240kbOK10
30ms240kbOK10
40ms240kbOK10
50ms240kbOK10
60ms236kbOK10
70ms236kbOK10
80ms236kbOK10
90ms244kbOK10
100ms240kbOK10
Punctaj total100

Ceva nu functioneaza?