結果

問題 No.1272 珍しい級数
ユーザー 遭難者遭難者
提出日時 2020-10-30 15:17:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 2,124 ms
コンパイル使用メモリ 71,592 KB
実行使用メモリ 56,116 KB
最終ジャッジ日時 2023-09-29 04:19:22
合計ジャッジ時間 11,867 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,116 KB
testcase_01 AC 121 ms
55,620 KB
testcase_02 AC 121 ms
55,680 KB
testcase_03 AC 122 ms
55,544 KB
testcase_04 AC 122 ms
55,848 KB
testcase_05 AC 123 ms
55,856 KB
testcase_06 AC 121 ms
55,900 KB
testcase_07 AC 124 ms
55,664 KB
testcase_08 AC 121 ms
55,528 KB
testcase_09 AC 121 ms
55,552 KB
testcase_10 AC 123 ms
56,096 KB
testcase_11 AC 121 ms
55,840 KB
testcase_12 AC 121 ms
55,404 KB
testcase_13 AC 121 ms
55,712 KB
testcase_14 AC 122 ms
55,712 KB
testcase_15 AC 121 ms
55,464 KB
testcase_16 AC 123 ms
55,712 KB
testcase_17 AC 121 ms
55,796 KB
testcase_18 AC 121 ms
55,836 KB
testcase_19 AC 122 ms
55,376 KB
testcase_20 AC 122 ms
55,632 KB
testcase_21 AC 121 ms
55,692 KB
testcase_22 AC 122 ms
55,608 KB
testcase_23 AC 122 ms
55,544 KB
testcase_24 AC 121 ms
55,784 KB
testcase_25 AC 122 ms
55,588 KB
testcase_26 AC 123 ms
56,108 KB
testcase_27 AC 121 ms
55,828 KB
testcase_28 AC 120 ms
55,492 KB
testcase_29 AC 120 ms
55,716 KB
testcase_30 AC 121 ms
55,504 KB
testcase_31 AC 123 ms
55,612 KB
testcase_32 AC 122 ms
55,784 KB
testcase_33 AC 121 ms
55,736 KB
testcase_34 AC 120 ms
55,836 KB
testcase_35 AC 120 ms
55,660 KB
testcase_36 AC 121 ms
55,716 KB
testcase_37 AC 121 ms
55,748 KB
testcase_38 AC 120 ms
55,428 KB
testcase_39 AC 121 ms
55,516 KB
testcase_40 AC 120 ms
55,328 KB
testcase_41 AC 120 ms
55,788 KB
testcase_42 AC 122 ms
55,676 KB
testcase_43 AC 123 ms
55,728 KB
testcase_44 AC 122 ms
56,012 KB
testcase_45 AC 121 ms
55,816 KB
testcase_46 AC 121 ms
56,040 KB
testcase_47 AC 120 ms
56,008 KB
testcase_48 AC 121 ms
55,660 KB
testcase_49 AC 125 ms
55,368 KB
testcase_50 AC 121 ms
55,552 KB
testcase_51 AC 121 ms
55,608 KB
testcase_52 AC 122 ms
55,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int k = Integer.parseInt(sc.next());
		double s = 0;
		for(int i = 1 ; i <= 10 ; i++){
			s += Math.sin(k * i) / Math.pow(i , i);
		}
		ou.println(s);
		sc.close();
		ou.flush();
	}
}
0