結果

問題 No.1971 Easy Sudoku
ユーザー 👑 kakel-sankakel-san
提出日時 2022-06-10 22:00:49
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 747 bytes
コンパイル時間 929 ms
コンパイル使用メモリ 110,856 KB
実行使用メモリ 25,264 KB
最終ジャッジ日時 2023-10-21 05:10:56
合計ジャッジ時間 2,194 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
25,260 KB
testcase_01 AC 27 ms
25,252 KB
testcase_02 AC 27 ms
25,260 KB
testcase_03 AC 27 ms
25,252 KB
testcase_04 AC 27 ms
25,264 KB
testcase_05 AC 26 ms
25,260 KB
testcase_06 AC 25 ms
25,248 KB
testcase_07 AC 29 ms
25,248 KB
testcase_08 AC 28 ms
25,260 KB
testcase_09 AC 26 ms
25,248 KB
testcase_10 AC 26 ms
25,248 KB
testcase_11 AC 26 ms
25,184 KB
testcase_12 AC 24 ms
25,260 KB
testcase_13 AC 27 ms
25,252 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[] NMi => ReadLine().Split().Select(c => int.Parse(c) - 1).ToArray();
    static int[][] NMap(int n) => Enumerable.Repeat(0, n).Select(_ => NMi).ToArray();
    static void Main()
    {
        var n = NN;
        var res = new int[n][];
        for (var i = 0; i < n; ++i)
        {
            res[i] = new int[n];
            for (var j = 0; j < n; ++j) res[i][j] = (i + j) % n + 1;
        }
        WriteLine(string.Join("\n", res.Select(r => string.Join(" ", r))));
    }
}
0