結果

問題 No.1519 Diversity
ユーザー lloyzlloyz
提出日時 2022-02-09 19:09:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 9,868 KB
最終ジャッジ日時 2023-09-07 04:55:46
合計ジャッジ時間 3,446 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,832 KB
testcase_01 AC 17 ms
7,764 KB
testcase_02 AC 16 ms
7,832 KB
testcase_03 AC 42 ms
8,516 KB
testcase_04 AC 74 ms
9,128 KB
testcase_05 AC 16 ms
7,916 KB
testcase_06 AC 92 ms
9,540 KB
testcase_07 AC 17 ms
7,784 KB
testcase_08 AC 25 ms
8,548 KB
testcase_09 AC 43 ms
8,624 KB
testcase_10 AC 68 ms
9,048 KB
testcase_11 AC 16 ms
7,916 KB
testcase_12 AC 87 ms
9,696 KB
testcase_13 AC 92 ms
9,868 KB
testcase_14 AC 94 ms
9,568 KB
testcase_15 AC 91 ms
9,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

cnt = 0
G = [[] for _ in range(n)]
for i in range(n):
    for j in range(i + 1, n - i):
        G[i].append(j + 1)
        cnt += 1

print(cnt)
for i in range(n):
    for j in G[i]:
        print(i + 1, j)
0