結果

問題 No.276 連続する整数の和(1)
ユーザー おっぺけぺーおっぺけぺー
提出日時 2018-01-23 05:01:12
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 954 ms / 1,000 ms
コード長 129 bytes
コンパイル時間 8,085 ms
コンパイル使用メモリ 248,532 KB
実行使用メモリ 62,332 KB
最終ジャッジ日時 2023-09-12 15:52:17
合計ジャッジ時間 18,786 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 940 ms
61,524 KB
testcase_01 AC 935 ms
61,520 KB
testcase_02 AC 940 ms
61,924 KB
testcase_03 AC 942 ms
61,632 KB
testcase_04 AC 947 ms
61,988 KB
testcase_05 AC 941 ms
61,348 KB
testcase_06 AC 928 ms
62,332 KB
testcase_07 AC 941 ms
61,504 KB
testcase_08 AC 939 ms
61,856 KB
testcase_09 AC 954 ms
61,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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