結果

問題 No.1006 Share an Integer
ユーザー 👑 tatyamtatyam
提出日時 2020-03-06 23:30:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 426 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 81,644 KB
実行使用メモリ 91,548 KB
最終ジャッジ日時 2024-04-22 10:38:51
合計ジャッジ時間 5,283 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,692 KB
testcase_01 AC 38 ms
52,856 KB
testcase_02 AC 43 ms
59,224 KB
testcase_03 AC 38 ms
52,708 KB
testcase_04 AC 44 ms
59,444 KB
testcase_05 AC 52 ms
61,272 KB
testcase_06 AC 48 ms
60,392 KB
testcase_07 AC 48 ms
60,876 KB
testcase_08 AC 48 ms
62,264 KB
testcase_09 AC 48 ms
61,704 KB
testcase_10 AC 47 ms
61,772 KB
testcase_11 AC 192 ms
84,544 KB
testcase_12 AC 404 ms
90,672 KB
testcase_13 AC 414 ms
91,200 KB
testcase_14 AC 426 ms
91,548 KB
testcase_15 AC 354 ms
89,100 KB
testcase_16 AC 147 ms
82,520 KB
testcase_17 AC 181 ms
84,668 KB
testcase_18 AC 368 ms
89,272 KB
testcase_19 AC 329 ms
88,568 KB
testcase_20 AC 328 ms
89,352 KB
testcase_21 AC 421 ms
91,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
mn = 0x1fffffff
for i in range(1,x):
    if mn > abs(f[i] - f[x-i]):
        mn = abs(f[i] - f[x-i])
for i in range(1,x):
    if mn == abs(f[i] - f[x-i]):
        print(i, x - i)
0