Borderou de evaluare (job #1190045)
Utilizator | Data | 24 mai 2014 13:03:20 | |
---|---|---|---|
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:4:15: error: expected initializer before numeric constant
long long MOD 1999999973;
^
user.cpp: In function ‘long long int FastExp(long long int, long long int)’:
user.cpp:9:22: error: ‘MOD’ was not declared in this scope
if(p==1) return n % MOD;
^
user.cpp:10:40: error: ‘MOD’ was not declared in this scope
if(p%2==0) return ( ((FastExp(n,p/2))%MOD) * ( (FastExp(n,p/2)) % MOD ) ) % MOD;
^
user.cpp:11:25: error: ‘MOD’ was not declared in this scope
if(p%2==1) return ( (n%MOD)*( ( FastExp(n,p-1) )%MOD) ) % MOD;
^
user.cpp:12:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !