結果

問題 No.1006 Share an Integer
ユーザー O2MTO2MT
提出日時 2020-08-15 11:40:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 263 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 49,308 KB
最終ジャッジ日時 2024-04-18 23:56:50
合計ジャッジ時間 10,543 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 473 ms
49,308 KB
testcase_01 AC 489 ms
43,812 KB
testcase_02 AC 487 ms
43,812 KB
testcase_03 AC 485 ms
44,064 KB
testcase_04 AC 485 ms
43,976 KB
testcase_05 AC 504 ms
44,224 KB
testcase_06 AC 486 ms
43,936 KB
testcase_07 AC 480 ms
43,804 KB
testcase_08 AC 479 ms
43,812 KB
testcase_09 AC 493 ms
44,184 KB
testcase_10 AC 498 ms
44,192 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
N = int(input())
l = np.zeros(N+1)

num = 10**9
for i in range(1,N+1):
  l[::i] += 1

for j in range(1,N):
  num = min(num,abs((j-l[j])-(N-j-l[N-j])))
num = int(num)

for k in range(1,N):
  if abs((k-l[k])-(N-k-l[N-k])) == num:
    print(k,N-k)
0