結果

問題 No.668 6.0*10^23
ユーザー m-44
提出日時 2019-10-05 15:53:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 365 bytes
コンパイル時間 1,573 ms
コンパイル使用メモリ 165,948 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-06 02:18:06
合計ジャッジ時間 2,684 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin>>s;

  int c = s.length() - 1;

  int x = (s[0]-'0') *100 + (s[1]-'0') * 10 + s[2] - '0';
  int y;
  if (x % 10 <= 4) {
    y = x / 10;
  } else {
    y = x / 10 + 1;
  }
  if (y == 100) {
    y = 10;
    ++c;
  }
  int a = y / 10;
  int b = y % 10;
  printf("%d.%d*10^%d\n", a, b, c);
}
0