結果
問題 |
No.71 そろばん
|
ユーザー |
![]() |
提出日時 | 2014-11-21 00:52:21 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 2,487 ms |
コンパイル使用メモリ | 76,364 KB |
実行使用メモリ | 42,112 KB |
最終ジャッジ日時 | 2025-01-02 19:47:20 |
合計ジャッジ時間 | 6,805 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 20 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans=0; for(int i=1;i<n;i++){ int sita=n-i; ans=Math.max(ans,(sita+1)*i+sita); } System.out.println(ans); } }