結果

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

ソースコード

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