結果
| 問題 |
No.314 ケンケンパ
|
| コンテスト | |
| ユーザー |
water_is_I
|
| 提出日時 | 2017-09-24 05:42:39 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 945 bytes |
| コンパイル時間 | 1,622 ms |
| コンパイル使用メモリ | 108,580 KB |
| 実行使用メモリ | 51,604 KB |
| 最終ジャッジ日時 | 2024-11-14 06:19:07 |
| 合計ジャッジ時間 | 29,953 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 TLE * 1 |
| other | AC * 5 TLE * 12 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace YukiCorderNo314_20170924 {
class Program {
static long courseNum=1;
static void Main(string[] args) {
int maxStep = int.Parse(Console.ReadLine());
KenPa(maxStep);
Console.WriteLine(courseNum%(10000000000+7));
}
static void KenPa(int maxStep) {
int kenCount=0;
for (int i = 0; i < maxStep; ) {
maxStep--;
//ケン確定
if (kenCount == 0) {
kenCount++;
}
//パ確定
else if (kenCount == 2) {
kenCount = 0;
}
//分岐確定
else {
courseNum++;
kenCount++;
//Console.WriteLine("分岐!");
KenPa(maxStep);
}
}
}
}
}
water_is_I