For this simple codeforce problem

,my code is not running for any test case after clicking submit button.

while this code **not my code** is passing all the tc.

is there any flaw in the logic?

```
// aMinuteMan *2017 this is my code
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define inf 999999999
#define maxn 1000007 //1e6
#define mod 1000000007
#define all(c) c.begin(),c.end()
#define isnum(a) (a>=48 && a<=57)
#define rep(i,n) for(int i=0;i<n;i++)
#define mset(x,v) memset(x,v,sizeof(x))
#define ischar(a) (a>='a' && a<='z')
#define isChar(a) (a>='A' && a<='Z')
#define setbits(x) __builtin_popcount(x) //number of set bits
#define fastcin ios_base::sync_with_stdio(false); cin.tie(NULL);
int main() {
//freopen("inp.txt", "r", stdin);
int t=1;
while(t--){
int n,k;
cin>>n>>k;
int strt=n*(k-1)+1;
int maxsm = strt;
int ans = 0;
for(int i=0;i<n;i++){
ans+=maxsm;
maxsm+=(n-k+1);
}
cout<<ans<<endl;
int minid = 1;
int maxid = strt+1;
for(int i=0;i<n;i++){
for(int j=1;j<k;j++){
cout<<minid<<" ";
minid++;
}
cout<<strt<<" ";
maxid=strt+1;
for(int j=0;j<n-k;j++){
cout<<maxid<<" ";
maxid++;
}
cout<<endl;
strt+=(n-k+1);
}
}
return 0;
}
```

can someone find the flaw in the logic.

my code doesn’t even run on codeforce(nothing happens when i click the submit button, but it instantly runs for other code) so i am able to tell which test case doesnt pass, but it gives correct result on computer.