結果
問題 |
No.276 連続する整数の和(1)
|
ユーザー |
![]() |
提出日時 | 2017-06-27 02:18:17 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 45 ms / 1,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 1,735 ms |
コンパイル使用メモリ | 72,888 KB |
実行使用メモリ | 37,108 KB |
最終ジャッジ日時 | 2024-10-04 10:02:54 |
合計ジャッジ時間 | 3,041 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(br.readLine()); br.close(); if(num%2==0){ System.out.println(num/2); }else{ System.out.println(num); } } }