結果
| 問題 | No.395 永遠の17歳 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-01 01:09:23 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 1,000 ms |
| コード長 | 509 bytes |
| 記録 | |
| コンパイル時間 | 3,959 ms |
| コンパイル使用メモリ | 102,528 KB |
| 実行使用メモリ | 18,176 KB |
| 最終ジャッジ日時 | 2026-05-16 13:33:52 |
| 合計ジャッジ時間 | 3,527 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace yukicode {
public class Program {
public static int Solver(System.IO.TextReader reader) {
var a = int.Parse( reader.ReadLine() );
if (a < 15) return -1;
for (var i = 8; i <= a; ++i) {
if (i + 7 == a) return i;
}
return -1;
}
private static void Main() {
Console.WriteLine( Solver( Console.In ) );
}
}
}