結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 905 ms
61,532 KB
testcase_01 AC 899 ms
61,488 KB
testcase_02 AC 900 ms
61,544 KB
testcase_03 AC 898 ms
61,560 KB
testcase_04 AC 906 ms
61,544 KB
testcase_05 AC 899 ms
61,552 KB
testcase_06 AC 903 ms
61,384 KB
testcase_07 AC 899 ms
61,824 KB
testcase_08 AC 894 ms
61,624 KB
testcase_09 AC 892 ms
61,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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