• Loading...


0-9:0-14
Accepted
91

View Plain Text

  1. b,t,a;
  2. f(n) {
  3.     n&&(t = f(n-1));
  4.     return !n*b + (n&&t>=10000)*t%10000 + (n&&t<10000&&t%2)*(t+3) + (n&&t<10000&&t%2==0)*(2*t+5);
  5. }
  6. main(i){
  7.     i&&gets(&i);
  8.     ~scanf("%d %d",&a,&b)&&printf("%d\n",f(a))&&main(0);
  9. }
  10.  


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