結果
問題 | No.285 消費税2 |
ユーザー |
|
提出日時 | 2015-10-09 22:48:42 |
言語 | C++11 (gcc 4.8.5) |
結果 |
AC
|
実行時間 | 4 ms |
コード長 | 988 Byte |
コンパイル時間 | 484 ms |
使用メモリ | 1,552 KB |
最終ジャッジ日時 | 2019-10-25 16:28:14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
challenge01.txt | AC | 3 ms
1,552 KB |
sample1.txt | AC | 3 ms
1,552 KB |
sample2.txt | AC | 3 ms
1,552 KB |
sample3.txt | AC | 3 ms
1,552 KB |
sample4.txt | AC | 4 ms
1,552 KB |
system_test1.txt | AC | 4 ms
1,552 KB |
system_test2.txt | AC | 2 ms
1,552 KB |
system_test3.txt | AC | 3 ms
1,552 KB |
system_test4.txt | AC | 3 ms
1,552 KB |
system_test5.txt | AC | 3 ms
1,544 KB |
system_test6.txt | AC | 3 ms
1,548 KB |
system_test7.txt | AC | 3 ms
1,548 KB |
system_test8.txt | AC | 2 ms
1,548 KB |
system_test9.txt | AC | 3 ms
1,548 KB |
system_test10.txt | AC | 3 ms
1,552 KB |
system_test11.txt | AC | 3 ms
1,548 KB |
system_test12.txt | AC | 3 ms
1,552 KB |
system_test13.txt | AC | 3 ms
1,552 KB |
system_test14.txt | AC | 2 ms
1,548 KB |
system_test15.txt | AC | 3 ms
1,552 KB |
system_test16.txt | AC | 3 ms
1,552 KB |
system_test17.txt | AC | 3 ms
1,548 KB |
system_test18.txt | AC | 3 ms
1,548 KB |
system_test19.txt | AC | 3 ms
1,548 KB |
test1.txt | AC | 3 ms
1,548 KB |
test2.txt | AC | 3 ms
1,552 KB |
test3.txt | AC | 3 ms
1,552 KB |
test4.txt | AC | 3 ms
1,552 KB |
test5.txt | AC | 3 ms
1,548 KB |
test6.txt | AC | 3 ms
1,548 KB |
ソースコード
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <numeric> #include <functional> #include <cmath> #include <queue> #include <stack> #include <set> #include <map> #include <string> #include <sstream> #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) #define var auto #define mod 1000000007 typedef long long ll; using namespace std; int inputValue(){ int a; cin >> a; return a; } template <typename T> void output(T a, int precision) { if(precision > 0){ cout << fixed << setprecision(precision) << a << "\n"; } else{ cout << a << "\n"; } } // end of template int main() { // source code ll n; cin >> n; n *= 108; stringstream s; s << n; string str = s.str(); string str1 = str.substr(0, str.size() - 2); string str2 = str.substr(str.size() - 2, 2); output(str1 + "." + str2, 0); return 0; }