結果

問題 No.300 平方数
ユーザー gu_21816943gu_21816943
提出日時 2017-06-27 01:19:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 483 bytes
コンパイル時間 2,453 ms
コンパイル使用メモリ 73,352 KB
実行使用メモリ 38,468 KB
最終ジャッジ日時 2024-04-15 02:02:15
合計ジャッジ時間 8,664 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
37,044 KB
testcase_01 AC 58 ms
37,452 KB
testcase_02 AC 82 ms
38,460 KB
testcase_03 AC 58 ms
37,280 KB
testcase_04 AC 57 ms
37,268 KB
testcase_05 AC 58 ms
37,332 KB
testcase_06 AC 59 ms
37,368 KB
testcase_07 AC 57 ms
37,208 KB
testcase_08 AC 59 ms
37,476 KB
testcase_09 AC 58 ms
37,328 KB
testcase_10 AC 57 ms
37,420 KB
testcase_11 AC 57 ms
37,368 KB
testcase_12 AC 56 ms
37,448 KB
testcase_13 WA -
testcase_14 AC 57 ms
37,048 KB
testcase_15 AC 57 ms
37,452 KB
testcase_16 WA -
testcase_17 AC 57 ms
37,280 KB
testcase_18 AC 58 ms
36,916 KB
testcase_19 AC 61 ms
37,460 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		double num=Double.parseDouble(br.readLine());
		br.close();

		int count=1;

		while(true){
			double tmp=Math.sqrt(count*num);
			if(tmp-Math.floor(tmp)>0){
				count++;
				continue;
			}
			break;
		}
		System.out.println(count);
	}
}
0