結果
| 問題 |
No.1218 Something Like a Theorem
|
| コンテスト | |
| ユーザー |
seven_three
|
| 提出日時 | 2020-09-04 21:34:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 602 bytes |
| コンパイル時間 | 811 ms |
| コンパイル使用メモリ | 92,504 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 12:04:17 |
| 合計ジャッジ時間 | 1,357 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int main() {
long double n, z;
cin >> n >> z;
for (long double i = 1; pow(i, n) <= pow(z, n); i++) {
if (pow(pow(z, n) - pow(i, n), 1 / n) == floor(pow(pow(z, n) - pow(i, n), 1 / n)) && pow(pow(z, n) - pow(i, n), 1 / n) > 0) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
}
seven_three