結果

問題 No.83 最大マッチング
コンテスト
ユーザー 抹茶アイス
提出日時 2023-07-21 16:42:21
言語 C#
(.NET 10.0.201)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
WA  
実行時間 -
コード長 505 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 14,236 ms
コンパイル使用メモリ 172,248 KB
実行使用メモリ 194,008 KB
最終ジャッジ日時 2026-04-10 00:10:36
合計ジャッジ時間 16,205 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (135 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

using System;
using System.Collections.Generic;
using System.Linq;
public class Program{
    public static void Main(){
        var n = int.Parse(Console.ReadLine());
        var a = n/3;
        var b = 0;
        if(n-a*3 == 1){
            a--;
            b = 2;
        }
        else if(n==2){
            b = 1;
        }
        for(var i=0;i<a;i++){
            Console.Write(7);
        }
        for(var i=0;i<b;i++){
            Console.Write(1);
        }
        Console.WriteLine();
    }
}
0