結果
| 問題 | No.668 6.0*10^23 |
| コンテスト | |
| ユーザー |
ku_material_ro
|
| 提出日時 | 2018-05-18 01:39:31 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 580 bytes |
| 記録 | |
| コンパイル時間 | 666 ms |
| コンパイル使用メモリ | 90,136 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-20 01:46:17 |
| 合計ジャッジ時間 | 1,851 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include<stdio.h>
#include<algorithm>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define SZ(x) ((int)(x).size())
using namespace std;
int main(){
string s;
cin >> s;
int k,a,b;
k = SZ(s) - 1;
a = s[0] - '0';
b = s[1] - '0';
if (s[2] - '0' >= 5) {
b += 1;
if (b == 10) {
a += 1;
b = 0;
if (a == 10) {
a = 1;
k += 1;
}
}
}
cout << a << "." << b << "*10^" << k << endl;
return 0;
}
ku_material_ro