結果

問題 No.1519 Diversity
ユーザー hir355hir355
提出日時 2021-05-28 21:07:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 82,176 KB
最終ジャッジ日時 2023-08-07 05:14:42
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,400 KB
testcase_01 AC 67 ms
71,328 KB
testcase_02 AC 68 ms
71,404 KB
testcase_03 AC 96 ms
78,384 KB
testcase_04 AC 108 ms
81,184 KB
testcase_05 AC 69 ms
71,332 KB
testcase_06 AC 113 ms
82,100 KB
testcase_07 AC 71 ms
71,440 KB
testcase_08 AC 93 ms
77,820 KB
testcase_09 AC 96 ms
78,344 KB
testcase_10 AC 104 ms
80,496 KB
testcase_11 AC 70 ms
71,428 KB
testcase_12 AC 112 ms
82,032 KB
testcase_13 AC 113 ms
82,176 KB
testcase_14 AC 113 ms
82,096 KB
testcase_15 AC 111 ms
82,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = []
for i in range(n // 2):
    for j in range(i + 1, n // 2):
        ans.append((i + 1, j + 1))
for i in range(1, n // 2 + 1):
    for j in range(i):
        ans.append((n // 2 + i, j + 1))
print(len(ans))
for e in ans:
    print(*e)
0