結果
| 問題 | 
                            No.432 占い(Easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             14番
                         | 
                    
| 提出日時 | 2016-11-08 11:41:01 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 34 ms / 2,000 ms | 
| コード長 | 1,541 bytes | 
| コンパイル時間 | 1,241 ms | 
| コンパイル使用メモリ | 117,408 KB | 
| 実行使用メモリ | 29,172 KB | 
| 最終ジャッジ日時 | 2024-11-25 04:43:37 | 
| 合計ジャッジ時間 | 3,249 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 22 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
public class Program
{
    public void Proc() {
        Reader.IsDebug = false;
        int inputCount = int.Parse(Reader.ReadLine());
        StringBuilder ans = new StringBuilder();
        for(int i=0; i<inputCount;i++) {
            int[] arr = Reader.ReadLine().Select(a=>int.Parse(a.ToString())).ToArray();
            while(arr.Length > 1) {
                int[] tmp = new int[arr.Length-1];
                for(int j=0; j<tmp.Length; j++) {
                    int num = arr[j] + arr[j+1];
                    tmp[j] = (num / 10)+(num%10);
                }
                arr = tmp;
            }
            ans.AppendLine(arr[0].ToString());
        }
        Console.Write(ans.ToString());
    }
    public class Reader {
        public static bool IsDebug = true;
        private static System.IO.StringReader SReader;
        private static string InitText = @"
10
3735193991
6406080286
5191117191
9096163630
2612780068
3850187272
6329054969
8747630709
5278943458
4022606808
";
        public static string ReadLine() {
            if(IsDebug) {
                if(SReader == null) {
                    SReader = new System.IO.StringReader(InitText.Trim());
                }
                return SReader.ReadLine();
            } else {
                return Console.ReadLine();
            }
        }
    }
    public static void Main(string[] args)
    {
        Program prg = new Program();
        prg.Proc();
    }
}
            
            
            
        
            
14番