Pagini recente » Cod sursa (job #442463) | Cod sursa (job #494602) | Cod sursa (job #178935) | Cod sursa (job #729978) | Borderou de evaluare (job #2023775)
Borderou de evaluare (job #2023775)
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 |
| 1 | 0ms | 248kb | OK | 10 |
| 2 | 0ms | 240kb | OK | 10 |
| 3 | 0ms | 240kb | OK | 10 |
| 4 | 0ms | 240kb | OK | 10 |
| 5 | 0ms | 240kb | OK | 10 |
| 6 | 0ms | 236kb | OK | 10 |
| 7 | 0ms | 236kb | OK | 10 |
| 8 | 0ms | 236kb | OK | 10 |
| 9 | 0ms | 244kb | OK | 10 |
| 10 | 0ms | 240kb | OK | 10 |
| Punctaj total | 100 |