• Loading...


0-3:0-58
Accepted
84

View Plain Text

  1. a,m,r,n;
  2.  
  3. f(n){
  4. (!n) && (r=a);
  5. (n) && (m=f(n-1));
  6. (n) && (m>=10000) && (r=m%10000);
  7. (n) && (m<10000) && (m%2) && (r=m+3);
  8. (n) && (m<10000) && (m%2==0) && (r=(m<<1)+5);
  9. return r;
  10. }
  11.  
  12. g(){
  13. (scanf("%d %d",&n,&a)!=-1) && printf("%d\n",f(n)) && g();
  14. }
  15.  
  16. main(){
  17. scanf("%d",&n);
  18. g();
  19. }
  20.  


List of Keywords used
    None


Trial 1
Trial 2
Trial 3
Trial 4
Submissions
Multipurpose
1000 pt
You are not logged in
0 / 170

Datatype
1000 pt
You are not logged in
0 / 308

No Bitwise
1000 pt
You are not logged in
0 / 78

Cuboid
1000 pt
You are not logged in
0 / 166

Evaluate the function
1000 pt
You are not logged in
0 / 94

Largest in the set
1000 pt
You are not logged in
0 / 69

2 to N
1000 pt
You are not logged in
0 / 144