結果

問題 No.56 消費税
ユーザー eringi103eringi103
提出日時 2016-10-21 10:07:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 671 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 101,556 KB
実行使用メモリ 25,332 KB
最終ジャッジ日時 2023-09-25 03:42:24
合計ジャッジ時間 5,335 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
23,340 KB
testcase_01 AC 80 ms
23,412 KB
testcase_02 AC 81 ms
23,280 KB
testcase_03 AC 80 ms
23,184 KB
testcase_04 AC 80 ms
23,408 KB
testcase_05 AC 81 ms
23,400 KB
testcase_06 AC 80 ms
23,188 KB
testcase_07 AC 80 ms
23,140 KB
testcase_08 AC 80 ms
23,252 KB
testcase_09 AC 81 ms
23,196 KB
testcase_10 AC 81 ms
25,276 KB
testcase_11 AC 80 ms
21,360 KB
testcase_12 AC 81 ms
23,260 KB
testcase_13 AC 80 ms
21,240 KB
testcase_14 AC 80 ms
23,264 KB
testcase_15 AC 80 ms
23,324 KB
testcase_16 AC 80 ms
23,484 KB
testcase_17 AC 80 ms
23,256 KB
testcase_18 AC 81 ms
25,256 KB
testcase_19 AC 80 ms
23,340 KB
testcase_20 AC 81 ms
25,208 KB
testcase_21 AC 80 ms
25,248 KB
testcase_22 AC 80 ms
25,332 KB
testcase_23 AC 80 ms
23,280 KB
testcase_24 AC 80 ms
23,260 KB
testcase_25 AC 80 ms
25,296 KB
testcase_26 AC 81 ms
23,204 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

public class Program
{
  static void Main()
  {
    string Kingaku_ = Console.ReadLine();
    string Yukikoda_ = "";
    string P_ = "";
    int i = 0;

    while (Kingaku_.Substring(i,1) != " ")
    {
      Yukikoda_ = Yukikoda_ + Kingaku_.Substring(i,1);
      i++;
    }
    P_ = Kingaku_.Substring(i + 1);

    int Yukikoda = Convert.ToInt32(Yukikoda_);
    int P = Convert.ToInt32(P_);

    double Kingaku = Yukikoda + (Yukikoda * P / 100);
    string result = Convert.ToString(Kingaku);
    int k = result.IndexOf(".");
    if (k > 0)
    {
      result.Remove(k);      
    }

    Console.WriteLine(result);

  }
}
0