結果
問題 |
No.56 消費税
|
ユーザー |
|
提出日時 | 2016-10-21 10:04:53 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 674 bytes |
コンパイル時間 | 1,926 ms |
コンパイル使用メモリ | 111,200 KB |
実行使用メモリ | 28,060 KB |
最終ジャッジ日時 | 2024-11-23 16:02:34 |
合計ジャッジ時間 | 2,741 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 2 |
other | AC * 5 WA * 18 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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, 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); } }