Borderou de evaluare (job #2225494)
Utilizator | Data | 27 iulie 2018 12:59:32 | |
---|---|---|---|
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 ‘int ridica(int, int)’:
user.cpp:12:21: error: expected primary-expression before ‘return’
else if(y & 1) (return x % MOD * ridica(x*x,(y-1) / 2)) % MOD;
^~~~~~
user.cpp:12:21: error: expected ‘)’ before ‘return’
user.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
user.cpp: In function ‘int main()’:
user.cpp:18: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:19: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:21:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d\n",&n,&p);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !