結果
| 問題 | No.668 6.0*10^23 |
| コンテスト | |
| ユーザー |
ts_
|
| 提出日時 | 2018-03-26 01:03:17 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 445 bytes |
| 記録 | |
| コンパイル時間 | 1,136 ms |
| コンパイル使用メモリ | 178,228 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-20 00:19:15 |
| 合計ジャッジ時間 | 2,595 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;
int main(){
string s;
cin>>s;
int n=s.size();
string t=s.substr(0,3);
int ti=stoi(t);
if(ti%10>4) ti+=10;
ti-=ti%10;
t=to_string(ti);
if(t.size()<=3) --n;
cout<<t[0]<<"."<<t[1]<<"*10^"<<n<<endl;
return 0;
}
ts_