結果
| 問題 |
No.9001 標準入出力の練習問題(テスト用)
|
| ユーザー |
くれちー
|
| 提出日時 | 2017-05-16 17:41:15 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 1,000 ms |
| コード長 | 898 bytes |
| コンパイル時間 | 771 ms |
| コンパイル使用メモリ | 114,568 KB |
| 実行使用メモリ | 26,300 KB |
| 最終ジャッジ日時 | 2024-09-17 05:25:41 |
| 合計ジャッジ時間 | 1,265 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 |
コンパイルメッセージ
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());
}
}
くれちー