結果
問題 | No.9001 標準入出力の練習問題(テスト用) |
ユーザー | くれちー |
提出日時 | 2017-05-16 17:41:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 1,000 ms |
コード長 | 898 bytes |
コンパイル時間 | 1,011 ms |
コンパイル使用メモリ | 110,176 KB |
実行使用メモリ | 24,604 KB |
最終ジャッジ日時 | 2023-10-17 06:47:35 |
合計ジャッジ時間 | 1,479 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,604 KB |
testcase_01 | AC | 27 ms
24,604 KB |
コンパイルメッセージ
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.IO; using System.Linq; using static Extensions; static class Extensions { public static void GetNums<T1, T2>(out T1 dest1, out T2 dest2) { var str = Console.ReadLine().Split(); dest1 = (T1)typeof(T1).GetMethod("Parse", new Type[] { typeof(string) }).Invoke(null, new object[] { str[0] }); dest2 = (T2)typeof(T2).GetMethod("Parse", new Type[] { typeof(string) }).Invoke(null, new object[] { str[1] }); } } class Program { static StreamWriter sw; static void Main() { sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Console.Out.Flush(); } static void Solve() { int a, b; GetNums(out a, out b); sw.Write(a + b + " "); sw.Write(Console.ReadLine()); } }