結果
| 問題 | No.83 最大マッチング |
| コンテスト | |
| ユーザー |
bayashiko_r
|
| 提出日時 | 2018-11-08 01:18:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 1,264 ms / 5,000 ms |
| コード長 | 663 bytes |
| 記録 | |
| コンパイル時間 | 825 ms |
| コンパイル使用メモリ | 112,284 KB |
| 実行使用メモリ | 41,344 KB |
| 最終ジャッジ日時 | 2026-05-15 01:13:58 |
| 合計ジャッジ時間 | 4,985 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
class Program {
static void Main(string[] args) {
//入力
ulong N = ulong.Parse(Console.ReadLine());
//出力する数字
string ans = "";
//Nが偶数の時
if (N % 2 == 0) {
for (ulong i = 0; i < N / 2; i++) {
ans += "1";
}
//Nが奇数の時
} else if (N % 2 == 1) {
for (ulong i = 0; i < N / 2; i++) {
if (i == 0) {
ans += "7";
} else {
ans += "1";
}
}
}
//出力
Console.WriteLine(ans);
}
}
bayashiko_r