標準入力で、半角スペース区切りの数字の文字列を取得
例: 2 3 7 4
その数字の文字列を、int型に変換して、配列に降順で格納する
string line = System.Console.ReadLine();
int[] nums = line.Split(' ').Select(x => int.Parse(x)).OrderByDescending(x => x).ToArray();
Go to list of users who liked
More than 5 years have passed since last update.
標準入力で、半角スペース区切りの数字の文字列を取得
例: 2 3 7 4
その数字の文字列を、int型に変換して、配列に降順で格納する
string line = System.Console.ReadLine();
int[] nums = line.Split(' ').Select(x => int.Parse(x)).OrderByDescending(x => x).ToArray();
Register as a new user and use Qiita more conveniently
Go to list of users who liked