結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2018-11-08 01:18:33 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 2,254 ms / 5,000 ms |
コード長 | 663 bytes |
コンパイル時間 | 885 ms |
コンパイル使用メモリ | 109,840 KB |
実行使用メモリ | 40,960 KB |
最終ジャッジ日時 | 2024-11-20 20:56:36 |
合計ジャッジ時間 | 7,444 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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);}}