結果

問題 No.1006 Share an Integer
ユーザー pluto77pluto77
提出日時 2020-06-19 13:49:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 337 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 1,424 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 92,864 KB
最終ジャッジ日時 2023-09-16 12:47:41
合計ジャッジ時間 5,577 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,300 KB
testcase_01 AC 69 ms
71,304 KB
testcase_02 AC 73 ms
75,952 KB
testcase_03 AC 67 ms
71,080 KB
testcase_04 AC 74 ms
76,384 KB
testcase_05 AC 79 ms
76,308 KB
testcase_06 AC 78 ms
76,232 KB
testcase_07 AC 78 ms
76,464 KB
testcase_08 AC 77 ms
76,492 KB
testcase_09 AC 77 ms
76,556 KB
testcase_10 AC 78 ms
76,500 KB
testcase_11 AC 206 ms
85,616 KB
testcase_12 AC 328 ms
92,020 KB
testcase_13 AC 328 ms
92,384 KB
testcase_14 AC 328 ms
92,864 KB
testcase_15 AC 284 ms
90,460 KB
testcase_16 AC 169 ms
83,708 KB
testcase_17 AC 208 ms
86,072 KB
testcase_18 AC 284 ms
90,248 KB
testcase_19 AC 269 ms
89,992 KB
testcase_20 AC 290 ms
90,920 KB
testcase_21 AC 337 ms
92,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1006
x=int(input())
f=[i for i in range(x)]
for i in range(1,x):
 for j in range(i,x,i):
  f[j]-=1
res=10**18
for i in range(1,x):
 if res>abs(f[i]-f[x-i]):
  res=abs(f[i]-f[x-i])
for i in range(1,x):
 if res==abs(f[i]-f[x-i]):
  print(i,x-i)
0