結果

問題 No.1666 累乗数
ユーザー tailstails
提出日時 2021-09-03 22:28:06
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 2,360 ms
コンパイル使用メモリ 160,096 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-09-19 02:36:46
合計ジャッジ時間 3,805 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

int primes[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61};

ll g(ll p,ll m){
	ll x=pow(m,1./p);
	while(x<1d8&&(x+1)**p<=m){
		++x;
	}
	return x-1;
}

ll f(ll k){
	ll lo=0,hi=1d18;
	while(lo+1<hi){
		ll m=lo+hi>>1;
		ll c=1;
		rep[primes](p,18){
			c+=g(p,m);
		}
		if(c<k){
			lo=m;
		}else{
			hi=m;
		}
	}
	return hi;
}

{
	ll@t;
	rep(t){
		ll@k;
		wt(f(k));
	}
}
0