結果
問題 | No.313 π |
ユーザー |
|
提出日時 | 2016-08-02 21:58:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 66 ms / 5,000 ms |
コード長 | 689 bytes |
コンパイル時間 | 4,286 ms |
コンパイル使用メモリ | 110,020 KB |
実行使用メモリ | 22,272 KB |
最終ジャッジ日時 | 2024-11-06 23:38:24 |
合計ジャッジ時間 | 8,422 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;class A {static string S;static void Main() {int[] cnt = new int[10];int[] ans = { 20104,20063,19892,20011,19874,20199,19898,20163,19956,19841};S = Console.ReadLine();int[] e = new int[2];for (int i = 0; i < 10; i++) {cnt[i] = Cnt(S, i);if (cnt[i] < ans[i]) {e[1] = i;}else if (cnt[i] > ans[i]) {e[0] = i;}}Console.WriteLine(e[0] + " " + e[1]);}static int Cnt(string s,int i) {int q = s.Length;string ss = s.Replace(i.ToString(), "");return q - ss.Length;}}