Ответ на сообщение- Сообщения должны быть написаны на английском языке и соответствовать тематике сайта.
- Сообщения не должны содержать оскорблений и нецензурной лексики.
- Сообщения не должны содержать правильных решений.
what is the difference between this code and that code, still get wrong Послано VNeo 16 июл 2017 06:34 i got WA#6 when i use this code #include <iostream> #include <cmath> using namespace std; long int n,m,y,p,q,r[999]; int main(){ cin>>n>>m>>y; for (int i=0;i<m;i++){ if (lround(pow(i,n)) % m==y){ q++; r[q]=i; } } if (q==0){ cout<<"-1"; } else { for (int i=1;i<=q;i++){ cout<<r[i]<<' '; } } } but when i use neighbored code which is already acc, and tested some test case between them, it give me same results. whats probably wrong in my code by the way, the neighbored code is pascal language, but the point is, i just used that for test case.
|