結果

問題 No.1519 Diversity
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2021-06-26 19:56:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 8,360 KB
最終ジャッジ日時 2023-09-07 15:31:43
合計ジャッジ時間 2,066 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,876 KB
testcase_01 AC 16 ms
7,856 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 35 ms
8,304 KB
testcase_04 AC 61 ms
8,352 KB
testcase_05 AC 15 ms
7,920 KB
testcase_06 AC 77 ms
8,228 KB
testcase_07 AC 15 ms
7,868 KB
testcase_08 AC 22 ms
8,360 KB
testcase_09 AC 37 ms
8,352 KB
testcase_10 AC 57 ms
8,256 KB
testcase_11 AC 15 ms
7,880 KB
testcase_12 AC 73 ms
8,252 KB
testcase_13 AC 76 ms
8,356 KB
testcase_14 AC 76 ms
8,252 KB
testcase_15 AC 75 ms
8,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = N - 1
cnt = N - 1
while cnt > 1:
  cnt -=2
  ans += cnt
print(ans)  
for i in range(1,N//2 + 1):
  for j in range(i+1,N - i + 2):
    print(i,j)
0