結果

問題 No.454 逆2乗和
ユーザー kuuso1kuuso1
提出日時 2016-12-06 00:35:50
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 1,266 bytes
コンパイル時間 1,789 ms
コンパイル使用メモリ 109,056 KB
実行使用メモリ 30,208 KB
最終ジャッジ日時 2024-05-05 21:09:32
合計ジャッジ時間 7,519 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		
		double[] ans = new double[100000];
		Parallel.For(0,100000,i=>{
		//for(int i=0;i<100000;i++){
			for(int j=1;j<10000;j++){
				ans[i] += 1.0/(X+i*10000+j)/(X+i*10000+j);
			}
			//Console.WriteLine(ans[i]);
		//}
		});
		
		for(int i=1;i<100000;i++) ans[i] += 1.0/(X+i*10000)/(X+i*10000);
		
		Console.WriteLine("{0:F12}",ans.Sum());
		
	}
	double X;
	public Sol(){
		X = rd();
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}
0