結果
| 問題 |
No.2954 Calculation of Exponentiation
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2024-11-08 22:22:45 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 309 bytes |
| コンパイル時間 | 469 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-11-08 22:22:51 |
| 合計ジャッジ時間 | 1,003 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
#include<stdio.h>
#include<math.h>
int main()
{
double a, b;
scanf("%lf%lf", &a, &b);
if (b > 0)
{
for (; b > 1; b -= 1);
}
else
{
for (; b < -1; b += 1);
}
double c = pow(a, b), eps = 1e-14;
if (c - eps <= round(c) && round(c) <= c + eps)
printf("Yes\n");
else
printf("No\n");
return 0;
}
pengin_2000