結果
問題 | No.1006 Share an Integer |
ユーザー | O2MT |
提出日時 | 2020-08-15 11:42:19 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 59,728 KB |
最終ジャッジ日時 | 2024-04-18 23:57:01 |
合計ジャッジ時間 | 9,816 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 495 ms
50,888 KB |
testcase_01 | AC | 497 ms
43,436 KB |
testcase_02 | AC | 494 ms
43,440 KB |
testcase_03 | AC | 481 ms
43,832 KB |
testcase_04 | AC | 491 ms
43,568 KB |
testcase_05 | AC | 490 ms
43,828 KB |
testcase_06 | AC | 467 ms
43,568 KB |
testcase_07 | AC | 502 ms
43,524 KB |
testcase_08 | AC | 488 ms
44,080 KB |
testcase_09 | AC | 489 ms
43,828 KB |
testcase_10 | AC | 473 ms
43,440 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
ソースコード
import numpy as np N = int(input()) l = np.zeros(N+1) num = 10**9 for i in range(1,N//2+1): l[::i] += 1 l[::N-i] += 1 for j in range(1,N//2+1): 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)