fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. while(cin>>n){
  8. int cube,sr;
  9. if(n==1){
  10. cout<<"Special"<<endl;
  11. }
  12. sr=sqrt(n);
  13. cube=round(pow(n,1.0/3.0));
  14. if(sr*sr==n){
  15. cout<<"Special"<<endl;
  16. }
  17. else if(cube*cube*cube==n){
  18. cout<<"Special"<<endl;
  19. }
  20. else{
  21. cout<<"Ordinary"<<endl;
  22. }
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5496KB
stdin
1
2
64
100
15625
0

stdout
Special
Special
Ordinary
Special
Special
Special
Special