結果
問題 |
No.1422 Social Distance in Train
|
ユーザー |
|
提出日時 | 2020-12-09 09:33:27 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 258 ms / 2,000 ms |
コード長 | 632 bytes |
コンパイル時間 | 10,632 ms |
コンパイル使用メモリ | 432,712 KB |
実行使用メモリ | 49,972 KB |
最終ジャッジ日時 | 2024-09-19 01:03:48 |
合計ジャッジ時間 | 15,054 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
import java.io.PrintWriter import java.util.* import kotlin.math.* fun PrintWriter.solve() { val n = nextInt() println(if (n % 2 == 1) 1 else n / 2 + 1) } fun main() { val writer = PrintWriter(System.out, false) writer.solve() writer.flush() } // region Scanner private var st = StringTokenizer("") private val br = System.`in`.bufferedReader() fun next(): String { while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine()) return st.nextToken() } fun nextInt() = next().toInt() fun nextLong() = next().toLong() fun nextLine() = br.readLine() fun nextDouble() = next().toDouble() // endregion