結果
問題 |
No.285 消費税2
|
ユーザー |
![]() |
提出日時 | 2015-12-06 14:15:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 804 ms |
コンパイル使用メモリ | 103,168 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-09-14 15:19:35 |
合計ジャッジ時間 | 2,508 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 WA * 4 |
コンパイルメッセージ
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; using System.Linq; namespace No285 { class MainClass { public static void Main (string[] args) { var n = Convert.ToInt64(Console.ReadLine ()); var n100 = n * 108L; var div = n100 / 100L; var mod = n100 % 100L; if (mod == 0) { Console.WriteLine (div.ToString ()); return; } string result = div.ToString () + "." + mod.ToString (); Console.WriteLine (result.ToString ()); return; } } }