結果

問題 No.51 やる気の問題
ユーザー fushime2
提出日時 2018-02-25 23:32:34
言語 D
(dmd 2.109.1)
結果
RE  
実行時間 -
コード長 316 bytes
コンパイル時間 734 ms
コンパイル使用メモリ 100,716 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-12 23:57:10
合計ジャッジ時間 2,026 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.algorithm, std.string, std.string, std.conv;
int readint() {
    return readln.chomp.to!int;
}
void main(){
    int w = readint(), d = readint();
    int ans = 0;
    while(w > 0 && d > 0) {
        ans = w / d^^2;
        d--;
        w -= ans;
    }
    writeln(ans);
    auto _ = readln();
}
0