結果

問題 No.508 超ゆとり教育
ユーザー jokin_tokeijokin_tokei
提出日時 2017-09-15 15:42:49
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 30,848 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 11:30:37
合計ジャッジ時間 776 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// this program includes 508

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void radius() {
	int n = 0;
	double r = 0, r_2 = 0;

	scanf("%d", &n);

	r_2 = n / 3;
//
//	printf("%f\n", r_2);

	r = pow(r_2, 0.5);

	if (r > 0) {
		printf("%d", (int) r);
	}
	else{
		printf("%d", 1);
	}
}

int main(void) {

	radius();

	return 0;
}
0