結果

問題 No.2954 Calculation of Exponentiation
ユーザー pengin_2000
提出日時 2024-11-08 22:07:54
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 30,464 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-11-08 22:07:58
合計ジャッジ時間 1,290 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 <= floor(c + eps))
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}
0