結果
問題 | No.313 π |
ユーザー |
![]() |
提出日時 | 2015-12-08 01:44:54 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 747 bytes |
コンパイル時間 | 819 ms |
コンパイル使用メモリ | 114,276 KB |
実行使用メモリ | 27,652 KB |
最終ジャッジ日時 | 2024-09-14 19:00:11 |
合計ジャッジ時間 | 2,883 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace No314{class MainClass{public static void Main (string[] args){var s = Console.ReadLine ();var expected = new long[]{20104,20063,19892,20011,19874,20199,19898,20163,19956,19841,};long[] values = new long[10];foreach (var element in s) {if (element == '.') {continue;}values [element - '0']++;}var upper = 0;var lower = 0;for (int i = 0; i < 10; i++) {if (values [i] > expected [i]) {upper = i;}if (values [i] < expected [i]) {lower = i;}}Console.WriteLine (upper + " " + lower);}}}