結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-03-15 15:05:36 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| コード長 | 431 bytes |
| コンパイル時間 | 1,985 ms |
| コンパイル使用メモリ | 193,824 KB |
| 最終ジャッジ日時 | 2025-01-09 06:58:39 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include<bits/stdc++.h>
using lint=long long;
int main(){
std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
std::string s;std::cin>>s;
lint n=std::stoll(s.substr(0,2));
lint d=s.length()-1;
if('4'<s.at(2))n++;
if(n==100)n=10,d++;
std::string t=std::to_string(n);
std::cout<<t.at(0)<<'.'<<t.substr(1,2)<<"*10^"<<d<<'\n';
}
ngtkana