結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
spacia
|
| 提出日時 | 2015-12-20 10:37:20 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 31 ms / 5,000 ms |
| + 490µs | |
| コード長 | 468 bytes |
| 記録 | |
| コンパイル時間 | 1,376 ms |
| コンパイル使用メモリ | 83,848 KB |
| 実行使用メモリ | 40,448 KB |
| 最終ジャッジ日時 | 2026-08-29 13:15:41 |
| 合計ジャッジ時間 | 3,345 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import java.io.*;
import java.util.*;
class Main51 {
public static void out (Object out) {
System.out.println(out);
}
public static void main (String[] args) throws IOException {
BufferedReader br =
new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int d = Integer.parseInt(br.readLine());
int ans = 0;
for (int i = 0; i < d; i++)
w -= ans = w / (int)Math.pow(d - i, 2);
out(ans);
}
}
spacia