Borderou de evaluare (job #1891764)
Utilizator | Data | 24 februarie 2017 12:08:09 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘long long unsigned int solve(long long int, long long int)’:
user.cpp:9:64: error: expected ‘)’ before ‘;’ token
if (n % 2 != 0) return (x * solve((x * x) % modulo,(n-1)/2);
^
user.cpp: In function ‘int main()’:
user.cpp:18:26: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long unsigned int*’ [-Wformat=]
scanf("%d %d", &x, &n);
^
user.cpp:18:26: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long unsigned int*’ [-Wformat=]
user.cpp: In function ‘long long unsigned int solve(long long int, long long int)’:
user.cpp:11:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
user.cpp: In function ‘int main()’:
user.cpp:16:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("lgput.in","r",stdin);
^
user.cpp:17:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("lgput.out","w",stdout);
^
user.cpp:18:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x, &n);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !