結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
suzu
|
| 提出日時 | 2023-04-21 10:07:52 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 123 ms / 5,000 ms |
| コード長 | 776 bytes |
| コンパイル時間 | 1,188 ms |
| コンパイル使用メモリ | 108,180 KB |
| 実行使用メモリ | 25,676 KB |
| 最終ジャッジ日時 | 2024-11-06 06:55:51 |
| 合計ジャッジ時間 | 2,399 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
if(n % 2 == 0)//偶数の時
{
int i = 0;
while(i < n/2)
{
Console.Write(1);
i++;
}
}else if(n == 1)//1の時
{
Console.WriteLine(1);
}else//3以上の奇数の時
{
int m = 0;
m = n - 3;
Console.Write(7);
for(int i = 0;i < m / 2;i++)
{
Console.Write(1);
}
}
}
}
}
suzu