結果
| 問題 | No.2007 Arbitrary Mod (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-15 21:28:29 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 746 bytes |
| 記録 | |
| コンパイル時間 | 2,850 ms |
| コンパイル使用メモリ | 244,880 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 16:53:56 |
| 合計ジャッジ時間 | 5,506 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 23 WA * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ch = char;
using ll = long long;
using ld = long double;
using db = double;
using st = string;
using vdb = vector<db>;
using vvdb = vector<vdb>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<ld>;
using vvd = vector<vd>;
using vs = vector<st>;
using vvs = vector<vs>;
using vc = vector<ch>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
const ll mod1 = 998244353;
const ll mod2 = 1000000007;
int main(){
ll A,N;
cin>>A>>N;
ll a=A;
ll b=1;
while(a<10000000LL){
a*=a;
b++;
}
if(N<b){
cout<<a<<endl;
ll c=1;
for(int i=0; i<N; i++)
c*=A;
cout<<c<<endl;
}
else{
cout<<a<<endl;
cout<<0<<endl;
}
}