結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2018-02-13 18:08:55 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 1,904 ms |
コンパイル使用メモリ | 73,828 KB |
実行使用メモリ | 41,596 KB |
最終ジャッジ日時 | 2024-11-30 01:16:27 |
合計ジャッジ時間 | 5,371 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 6 |
ソースコード
import java.util.*; import java.math.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int w = sc.nextInt(); int d = sc.nextInt(); double a = 0; while (true) { if (d==1) {break;} else { a = Math.floor(w/(d*d)); w -= (int)a; d--; } } System.out.println(w); } }