結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
mtsu_friends
|
| 提出日時 | 2021-04-05 13:37:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 5,000 ms |
| コード長 | 501 bytes |
| コンパイル時間 | 5,471 ms |
| コンパイル使用メモリ | 113,712 KB |
| 実行使用メモリ | 27,916 KB |
| 最終ジャッジ日時 | 2024-12-30 22:38:42 |
| 合計ジャッジ時間 | 7,760 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
コンパイルメッセージ
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;
class Yuki5 {
private static string In => Console.ReadLine();
static void Main(string[] _) {
var count = 0;
var length = int.Parse(In);
Console.ReadLine();
var width = In.Split().Select(int.Parse).ToList();
width.Sort();
foreach (var l in width) {
if (length >= l) {
length -= l;
count++;
} else break;
}
Console.WriteLine(count);
}
}
mtsu_friends