結果
| 問題 | No.2007 Arbitrary Mod (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-16 16:28:53 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 476 bytes |
| 記録 | |
| コンパイル時間 | 1,148 ms |
| コンパイル使用メモリ | 208,256 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-26 16:45:49 |
| 合計ジャッジ時間 | 3,421 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
#define all(A) A.begin(),A.end()
#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll A,N,an=1;
cin>>A>>N;
rep(i,N){
an*=A;
if(1e7<=an&&an<=1e18){
cout<<an<<endl<<0<<endl;
return 0;
}
}
cout<<ll(1e18)<<endl<<an<<endl;
}