結果
問題 | No.83 最大マッチング |
ユーザー |
|
提出日時 | 2017-08-21 21:55:20 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 676 bytes |
コンパイル時間 | 935 ms |
コンパイル使用メモリ | 107,268 KB |
実行使用メモリ | 17,664 KB |
最終ジャッジ日時 | 2024-10-15 00:54:46 |
合計ジャッジ時間 | 1,798 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;using System.Collections.Generic;using System.Linq;public class yukicoder{public static string match(int n){if(n == 0){return "";}System.Text.StringBuilder sb = new System.Text.StringBuilder();for (int i = 1; i <= n / 2; i++){sb.Append("1");}return sb.ToString();}public static void Main(){int a = int.Parse(Console.ReadLine());if(a % 2 == 0){Console.WriteLine(match(a));}else{Console.WriteLine("7" + match(a - 3));}}}