Submission

Status:

Compilation Error

Subtask/Task Score:

Score: 0

User: Test

Problemset: โชว์ของโลมา

Language: cpp

Time: 0.000 second

Submitted On: 2025-12-30 16:27:12

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int n,ct;
void fun(ll st,ll dim){

    if(dim==1){
        ct+=st;
        //cout << st%10 << "\n";
        return;
    }

    if (dim==2){
      ct+=(st+2)%10 +s (st+3)%10;
      //cout << (st+2) << " "  << (st+3) << "\n";
      return;
    }

    ct+=(st+3*dim-3)%10;
    //cout << st+3*dim-3 << " ";
    ct+=(st+3*dim-2)%10;
    //cout << st+3*dim-2 << " ";
    fun((st+4*dim-4),dim-2);

}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n;
    fun(1,n);
    cout << ct;

}