結果

問題 No.1169 Row and Column and Diagonal
ユーザー root__786
提出日時 2020-08-15 01:40:51
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 2,344 ms
コンパイル使用メモリ 190,940 KB
最終ジャッジ日時 2025-01-13 00:51:56
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define tezz std::ios::sync_with_stdio(false);std::cout.tie(NULL);std:cin.tie(NULL);

int main() {
    ll n;
    cin>>n;
    for(ll i=0;i<n;i++){
        for(ll j=0;j<n;j++){
            ll a=(i*2-j+n)%n+1;
            cout<<a<<" ";
        }
        cout<<endl;
    }
        
}
0