結果

問題 No.313 π
ユーザー kuuso1kuuso1
提出日時 2015-12-06 01:28:14
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 2,275 bytes
コンパイル時間 5,390 ms
コンパイル使用メモリ 108,580 KB
実行使用メモリ 24,556 KB
最終ジャッジ日時 2023-10-12 16:22:35
合計ジャッジ時間 7,817 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
20,512 KB
testcase_01 AC 68 ms
20,412 KB
testcase_02 AC 70 ms
22,528 KB
testcase_03 AC 70 ms
22,560 KB
testcase_04 AC 69 ms
20,412 KB
testcase_05 AC 68 ms
22,452 KB
testcase_06 AC 72 ms
24,488 KB
testcase_07 AC 68 ms
22,448 KB
testcase_08 AC 69 ms
22,496 KB
testcase_09 AC 69 ms
22,408 KB
testcase_10 AC 68 ms
24,432 KB
testcase_11 AC 66 ms
22,580 KB
testcase_12 AC 70 ms
22,580 KB
testcase_13 AC 68 ms
22,444 KB
testcase_14 AC 68 ms
22,576 KB
testcase_15 AC 68 ms
24,532 KB
testcase_16 AC 72 ms
24,504 KB
testcase_17 AC 71 ms
22,464 KB
testcase_18 AC 70 ms
24,448 KB
testcase_19 AC 70 ms
24,556 KB
testcase_20 AC 71 ms
24,548 KB
testcase_21 AC 72 ms
24,532 KB
testcase_22 AC 70 ms
22,464 KB
testcase_23 AC 69 ms
22,596 KB
testcase_24 AC 70 ms
22,388 KB
testcase_25 AC 70 ms
22,488 KB
testcase_26 AC 71 ms
20,512 KB
testcase_27 AC 75 ms
22,496 KB
testcase_28 AC 72 ms
20,412 KB
testcase_29 AC 72 ms
24,492 KB
testcase_30 AC 72 ms
22,512 KB
testcase_31 AC 72 ms
22,588 KB
testcase_32 AC 72 ms
22,480 KB
testcase_33 AC 73 ms
22,556 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Net;
using System.IO;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		// 正解をゲットする
		
		bool gabagaba=false;
		if(gabagaba){
			HttpWebRequest HttpWReq;
			Encoding enc = Encoding.UTF8;
			String url="http://www.geocities.jp/unko_der/sample_01.txt";
			
			HttpWReq=(HttpWebRequest)WebRequest.Create(url);
			HttpWReq.Method="GET";
			
			HttpWebResponse HttpWResp = (HttpWebResponse)HttpWReq.GetResponse();
			
	                Stream resStream = HttpWResp.GetResponseStream();
	                StreamReader sr = new StreamReader(resStream, enc);
	                String html = sr.ReadToEnd();
	                sr.Close();
	                resStream.Close();		
	                HttpWResp.Close();
	                
			var ca=html.ToCharArray();
			ca[0]='3';
			var PI0=new String(ca);
			for(int i=0;i<S.Length;i++){
				if(S[i]!=PI0[i]){
					Console.WriteLine("{0} {1}",S[i],PI0[i]);
				}
			}
		}
		
		Dictionary<char,int> D=new Dictionary<char,int>();
		for(int i=0;i<S.Length;i++){
			if(D.ContainsKey(S[i])==false)D.Add(S[i],0);
			D[S[i]]++;
		}
		
		var PI=new Dictionary<char,int>(){
			{'3',20011},
			{'.',1},
			{'1',20063},
			{'4',19874},
			{'5',20199},
			{'9',19841},
			{'2',19892},
			{'6',19898},
			{'8',19956},
			{'7',20163},
			{'0',20104}
		};
		
		char less='x';
		char more='x';
		foreach(var k in PI.Keys){
			if(D[k]>PI[k])more=k;
			if(D[k]<PI[k])less=k;
		}
		Console.WriteLine("{0} {1}",more,less);
	}
	String S;
	public Sol(){
		S=rs();
	}




	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(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
	
	
	
	
	
}
0