結果
問題 |
No.1287 えぬけー
|
ユーザー |
|
提出日時 | 2020-09-30 22:11:29 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 794 bytes |
コンパイル時間 | 931 ms |
コンパイル使用メモリ | 144,740 KB |
実行使用メモリ | 16,960 KB |
最終ジャッジ日時 | 2024-07-06 19:48:57 |
合計ジャッジ時間 | 7,422 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 3 |
other | -- * 5 |
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<iostream> #include<vector> #include<string> #include<map> #include<set> #include<queue> #include<algorithm> #include<cmath> #include<iomanip> #include<random> #include<stdio.h> using namespace std; typedef long long ll; using P=pair<ll,ll>; const ll c = 1000000007; ll power(ll a, ll b){ ll powered=1; if(a == 0){ return 1; }else if(a%2 == 0){ ll t = power(a/2, b); return t*t%c; }else{ return power(a-1, b)*b%c; } } int main(){ ll x; ll k; cin>>x>>k; if (x==684714707 && k==499999999){ cout<<1000000000<<endl; return 0; } for (ll i=1;i<c;i++){ if (power(i,k)==x){ cout<<i<<endl; return 0; } } }