結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
bayashiko_r
|
| 提出日時 | 2018-11-08 00:54:50 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 598 bytes |
| コンパイル時間 | 811 ms |
| コンパイル使用メモリ | 102,912 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-11-20 20:55:18 |
| 合計ジャッジ時間 | 1,550 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 7 |
コンパイルメッセージ
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;
}
//出力
Console.WriteLine(ans);
}
}
bayashiko_r