結果
問題 | No.395 永遠の17歳 |
ユーザー |
![]() |
提出日時 | 2016-08-21 15:49:49 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 143 ms / 1,000 ms |
コード長 | 749 bytes |
コンパイル時間 | 4,048 ms |
コンパイル使用メモリ | 79,176 KB |
実行使用メモリ | 54,356 KB |
最終ジャッジ日時 | 2024-10-05 02:05:31 |
合計ジャッジ時間 | 6,148 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
import java.util.*; import java.io.*; import java.awt.geom.*; import java.math.*; public class No0395 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static boolean debug = false; static void solve() { int a = in.nextInt(); for (int i=8; i<1000; i++) { if (7 + i == a) { out.println(i); return; } } out.println("-1"); } public static void main(String[] args) { debug = args.length > 0; long start = System.nanoTime(); solve(); out.flush(); long end = System.nanoTime(); dump((end - start) / 1000000 + " ms"); in.close(); out.close(); } static void dump(Object... o) { if (debug) System.err.println(Arrays.deepToString(o)); } }