結果

問題 No.1519 Diversity
ユーザー hir355hir355
提出日時 2021-05-28 21:07:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 80,944 KB
最終ジャッジ日時 2024-04-24 23:22:14
合計ジャッジ時間 2,280 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,712 KB
testcase_01 AC 39 ms
51,456 KB
testcase_02 AC 40 ms
51,840 KB
testcase_03 AC 78 ms
77,184 KB
testcase_04 AC 92 ms
79,872 KB
testcase_05 AC 36 ms
51,712 KB
testcase_06 AC 93 ms
80,936 KB
testcase_07 AC 40 ms
52,352 KB
testcase_08 AC 74 ms
76,288 KB
testcase_09 AC 78 ms
77,056 KB
testcase_10 AC 87 ms
79,104 KB
testcase_11 AC 37 ms
52,224 KB
testcase_12 AC 96 ms
80,768 KB
testcase_13 AC 96 ms
80,828 KB
testcase_14 AC 98 ms
80,944 KB
testcase_15 AC 99 ms
80,896 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