結果
| 問題 |
No.8047 Riddle of Cards
|
| ユーザー |
a01sa01to
|
| 提出日時 | 2025-05-28 00:17:48 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 551 bytes |
| コンパイル時間 | 2,846 ms |
| コンパイル使用メモリ | 275,772 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-28 00:17:52 |
| 合計ジャッジ時間 | 3,721 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
ull pow(ull a, ull b) {
ull res = 1;
rep(_, b) res *= a;
return res;
}
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
ull n, m;
cin >> n >> m;
if (n == 16 && m == 16) {
// overflows
cout << "18446744073709551616" << '\n';
}
else {
cout << pow(m, n) << '\n';
}
return 0;
}
a01sa01to