fork download
  1. #include <stdio.h>
  2.  
  3. int hoge(int n){
  4. if(n<=0){
  5. return 0;
  6. }else{
  7. return (hoge(n-1)+1)%10;
  8. }
  9. }
  10.  
  11. int main(void) {
  12. // your code goes here
  13. printf("%d",hoge(2021));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1