結果

問題 No.276 連続する整数の和(1)
ユーザー おっぺけぺーおっぺけぺー
提出日時 2018-01-22 00:16:10
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 906 ms / 1,000 ms
コード長 151 bytes
コンパイル時間 7,158 ms
コンパイル使用メモリ 246,028 KB
実行使用メモリ 61,968 KB
最終ジャッジ日時 2023-09-12 15:49:21
合計ジャッジ時間 17,564 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 906 ms
61,432 KB
testcase_01 AC 897 ms
61,484 KB
testcase_02 AC 891 ms
61,668 KB
testcase_03 AC 897 ms
61,688 KB
testcase_04 AC 896 ms
61,616 KB
testcase_05 AC 893 ms
61,968 KB
testcase_06 AC 893 ms
61,664 KB
testcase_07 AC 886 ms
61,652 KB
testcase_08 AC 888 ms
61,600 KB
testcase_09 AC 887 ms
61,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

object Main extends App {
    
    val n = scala.io.StdIn.readLine().toLong
    val ans = if (n % 2 == 0) n / 2 else n
    println(ans.toString)
    
}
0