結果

問題 No.51 やる気の問題
ユーザー kimnykimny
提出日時 2017-12-08 15:41:23
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 556 bytes
コンパイル時間 2,428 ms
コンパイル使用メモリ 101,864 KB
実行使用メモリ 22,892 KB
最終ジャッジ日時 2023-08-19 22:30:43
合計ジャッジ時間 4,990 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,736 KB
testcase_01 AC 55 ms
20,744 KB
testcase_02 AC 55 ms
22,668 KB
testcase_03 AC 55 ms
18,780 KB
testcase_04 AC 55 ms
20,700 KB
testcase_05 RE -
testcase_06 AC 55 ms
20,732 KB
testcase_07 AC 56 ms
20,888 KB
testcase_08 AC 55 ms
22,776 KB
testcase_09 RE -
testcase_10 AC 56 ms
22,740 KB
testcase_11 AC 56 ms
20,796 KB
testcase_12 AC 57 ms
22,888 KB
testcase_13 AC 56 ms
18,704 KB
testcase_14 AC 55 ms
20,824 KB
testcase_15 RE -
testcase_16 AC 57 ms
18,880 KB
testcase_17 AC 57 ms
22,892 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 57 ms
20,916 KB
testcase_21 AC 56 ms
18,892 KB
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder_51 {
    class Program {
        static void Main(string[] args) {
            int w = int.Parse(Console.ReadLine());
            int d = int.Parse(Console.ReadLine());
            double l;
            for (; d > 1; d--) {
                l = w / (d * d);
                l = Math.Floor(l);
                w -= (int)l;
            }
            Console.WriteLine(w);
            Console.ReadLine();
        }
    }
}
0