結果
問題 |
No.71 そろばん
|
ユーザー |
![]() |
提出日時 | 2015-08-12 03:27:08 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 1,871 ms |
コンパイル使用メモリ | 74,628 KB |
実行使用メモリ | 50,520 KB |
最終ジャッジ日時 | 2024-07-18 06:51:32 |
合計ジャッジ時間 | 3,360 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 20 |
ソースコード
import java.io.*; class Main{ static final PrintWriter out=new PrintWriter(System.out); public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null&&!line.isEmpty()){ int n=Integer.parseInt(line); int k=(int)n/2; long ans=-k*k+n*k+n; out.println(ans); out.flush(); } } }