Skip to content

Instantly share code, notes, and snippets.

@yukkuribemani
Created April 29, 2014 16:29
Show Gist options
  • Save yukkuribemani/11405372 to your computer and use it in GitHub Desktop.
Save yukkuribemani/11405372 to your computer and use it in GitHub Desktop.
C#で競技プログラミング用コードの メモ(標準入出力) ref: http://qiita.com/yukkuribemani/items/b472b6e1e81c72319b2d
using System;
class Program
{
static void Main(string[] args)
{
  int a,b,c;
a = int.Parse(Console.ReadLine()); //標準入力
string[] str = Console.ReadLine().Split(' ');//2つ以上のスペース区切り入力の取得
b = int.Parse(str[0]); //数値で受け取りたい場合は変換する
c = int.Parse(str[1]);
       Console.Write("改行なし a = {0} b = {1} c = {2}", a, b, c)//改行なし出力
Console.WriteLine("改行あり a = {0} b = {1} c = {2}", a, b, c);//改行付き出力
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment