結果

問題 No.3332 Consecutive Power Sum (Small)
コンテスト
ユーザー 👑 p-adic
提出日時 2025-11-02 21:53:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 240,132 KB
最終ジャッジ日時 2025-11-02 21:53:43
合計ジャッジ時間 13,538 ms
ジャッジサーバーID
(参考情報)
judge6 / judge8
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28 WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

R=range
N=int(input())
O=print
a=[]
M=N*2
for i in R(1,M):
	if i*i>=M:break
	if M%i==0:j=M//i;l,r=(j-i+1)>>1,(j+i-1)>>1;a+=[(1,l,r)]
for e in R(2,40):
	c={}
	c[0]=s=t=i=0;
	while t<=N:i+=1;t=i**e;s+=t;c[s]=i
	for v in c:
		if v-N in c:a+=[(e,c[v-N]+1,c[v])]
O(len(a))
for e,l,r in sorted(a):O(e,l,r)
0