結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
bayashiko_r
|
| 提出日時 | 2018-11-08 00:56:24 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 629 bytes |
| コンパイル時間 | 868 ms |
| コンパイル使用メモリ | 108,008 KB |
| 実行使用メモリ | 25,940 KB |
| 最終ジャッジ日時 | 2024-11-20 20:55:23 |
| 合計ジャッジ時間 | 1,389 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 4 |
コンパイルメッセージ
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) {
//入力
int N = int.Parse(Console.ReadLine());
//出力する数字
int ans = 0;
//Nが偶数の時
if (N % 2 == 0) {
for (int i = 0; i < N / 2; i++) {
ans += (int)Math.Pow(10, i);
}
//Nが奇数の時
} else if (N % 2 == 1) {
for (int i = 0; i < N / 2; i++) {
ans += (int)Math.Pow(10, i);
}
ans += 6 * (int)Math.Pow(10, N / 2 - 1);
}
//出力
Console.WriteLine(ans);
}
}
bayashiko_r