結果

問題 No.1169 Row and Column and Diagonal
ユーザー ntk-ta01ntk-ta01
提出日時 2020-08-14 23:35:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 931 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 76,372 KB
最終ジャッジ日時 2024-04-18 23:18:25
合計ジャッジ時間 2,321 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,632 KB
testcase_01 AC 39 ms
53,632 KB
testcase_02 AC 41 ms
53,504 KB
testcase_03 AC 39 ms
53,632 KB
testcase_04 AC 40 ms
53,760 KB
testcase_05 AC 40 ms
53,988 KB
testcase_06 AC 54 ms
67,336 KB
testcase_07 AC 56 ms
73,856 KB
testcase_08 AC 61 ms
76,240 KB
testcase_09 AC 70 ms
75,936 KB
testcase_10 AC 77 ms
76,288 KB
testcase_11 AC 75 ms
76,288 KB
testcase_12 AC 79 ms
76,188 KB
testcase_13 AC 80 ms
76,372 KB
testcase_14 AC 82 ms
76,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    from collections import deque
    ans = []
    for i in range(1, N//2 + 1):
        ans.append(i)
        ans.append(0--N//2 + i)
    ans.append(0--N//2)
    ans = deque(ans)
    for i in range(N):
        print(*ans)
        ans.rotate(-1)


if __name__ == '__main__':
    main()
0