結果

問題 No.1519 Diversity
ユーザー KudeKude
提出日時 2021-05-28 20:44:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 81,152 KB
最終ジャッジ日時 2024-04-24 23:03:33
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,712 KB
testcase_01 AC 35 ms
52,096 KB
testcase_02 AC 35 ms
51,840 KB
testcase_03 AC 70 ms
77,056 KB
testcase_04 AC 81 ms
79,872 KB
testcase_05 AC 37 ms
52,096 KB
testcase_06 AC 88 ms
80,896 KB
testcase_07 AC 41 ms
52,864 KB
testcase_08 AC 64 ms
74,496 KB
testcase_09 AC 72 ms
76,928 KB
testcase_10 AC 80 ms
79,488 KB
testcase_11 AC 36 ms
51,840 KB
testcase_12 AC 86 ms
81,024 KB
testcase_13 AC 86 ms
81,024 KB
testcase_14 AC 88 ms
81,152 KB
testcase_15 AC 86 ms
80,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
d = list(range(n))
ans = []
l = 0
r = n
while r - l > 2:
    for i in range(l + 1, r - 1):
        ans.append((l, i))
    l += 1
    r -= 1
print(len(ans))
for u, v in ans:
    print(u + 1, v + 1)
0