結果
| 問題 | No.1273 はじめのζ関数 |
| ユーザー |
👑 |
| 提出日時 | 2020-10-31 00:29:44 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 180 ms / 2,000 ms |
| + 540µs | |
| コード長 | 459 bytes |
| 記録 | |
| コンパイル時間 | 3,293 ms |
| コンパイル使用メモリ | 89,344 KB |
| 実行使用メモリ | 48,748 KB |
| 最終ジャッジ日時 | 2026-11-11 01:49:03 |
| 合計ジャッジ時間 | 11,746 ms |
|
ジャッジサーバーID (参考情報) |
judge7_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 42 |
ソースコード
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 x = Integer.parseInt(sc.next()) - 1;
double q = 0;
for(int i = 1 ; i <= Math.pow(10 , 6) ; i++){
q += Math.pow(10 , 6) / (i * Math.pow(i + 1 , x));
}
if(x == 1) ou.println((int)Math.pow(10 , 6));
else ou.println((int)q);
sc.close();
ou.flush();
}
}