結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-04 15:27:34 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 142 ms / 5,000 ms |
| コード長 | 614 bytes |
| コンパイル時間 | 7,768 ms |
| コンパイル使用メモリ | 167,644 KB |
| 実行使用メモリ | 188,204 KB |
| 最終ジャッジ日時 | 2025-11-04 15:27:44 |
| 合計ジャッジ時間 | 9,824 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (109 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string inputNum = Console.ReadLine()!;
int stickCount = int.Parse(inputNum);
if (stickCount % 2 == 0)
{
int max = stickCount / 2;
for (int i = 0; i < max; i++)
{
Console.Write(1);
}
}
else
{
int max = stickCount - 3;
Console.Write(7);
max = max / 2;
for (int i = 0;i < max; i++)
{
Console.Write(1);
}
}
Console.WriteLine();
}
}