結果
問題 |
No.1273 はじめのζ関数
|
ユーザー |
![]() |
提出日時 | 2020-09-21 16:54:09 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 621 bytes |
コンパイル時間 | 3,146 ms |
コンパイル使用メモリ | 79,400 KB |
実行使用メモリ | 47,080 KB |
最終ジャッジ日時 | 2024-07-21 22:51:55 |
合計ジャッジ時間 | 14,046 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 1 |
other | WA * 21 TLE * 1 -- * 18 |
ソースコード
import java.util.*; import java.io.*; import java.math.*; public class Main { public static void main(String[]args){ Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int n = Integer.parseInt(sc.next()); sc.close(); double yo = 1; if(n==2){ ou.println("y"); ou.println(Math.pow(10,2)); ou.flush(); } else{ ou.println("m"); for(int j=2;j<n;j++){ yo++; for(int i = 1 ; i <= Math.pow(10 ,5) ; i++){ yo -= 1 / Math.pow(i , j); } // ou.println(yo); } ou.println(yo); ou.flush(); } } }