結果

問題 No.1006 Share an Integer
ユーザー stngstng
提出日時 2022-08-18 11:11:41
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 391 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 298,752 KB
最終ジャッジ日時 2024-04-15 19:45:15
合計ジャッジ時間 4,342 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
57,728 KB
testcase_01 AC 39 ms
51,584 KB
testcase_02 AC 46 ms
58,752 KB
testcase_03 AC 39 ms
51,712 KB
testcase_04 AC 45 ms
59,136 KB
testcase_05 AC 52 ms
61,184 KB
testcase_06 AC 51 ms
61,568 KB
testcase_07 AC 50 ms
61,824 KB
testcase_08 AC 52 ms
61,312 KB
testcase_09 AC 58 ms
61,568 KB
testcase_10 AC 53 ms
61,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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
Z = x

D = [[] for _ in range(Z+1)]
for i in range(1, Z+1):
    for j in range(i, Z+1, i):
        D[j].append(i)

li = [[] for i in range(x+1)]

for i in range(1,x):
    fa = i-len(D[i])
    fb = (x-i)-len(D[x-i])
    li[abs(fa-fb)].append([i,x-i])

for i in range(x+1):
    if len(li[i]) > 0:
        for j in range(len(li[i])):
            print(*li[i][j])
        exit()
0