fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. long long t;
  6. while(cin>>t)
  7. {
  8. if(t!=0)
  9. {
  10. long long b=sqrt(t);
  11. int c=round(cbrt(t));
  12. if(b*b==t && c*c*c==t)
  13. cout<<"Special\n";
  14. else
  15. cout<<"Ordinary\n";
  16. }
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 5444KB
stdin
1
2
64
100
15625
0


stdout
Special
Ordinary
Special
Ordinary
Special