結果
問題 | No.668 6.0*10^23 |
ユーザー |
|
提出日時 | 2018-07-04 17:38:47 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 141 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 02:13:43 |
合計ジャッジ時間 | 1,470 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%s", a); | ~~~~~^~~~~~~~~
ソースコード
#include<cstdio>int main(void) {char a[100010];int A, B, C;long long int i;scanf("%s", a);for (i = 0; a[i] != '\0'; i++);A = (int)a[0] - 48;B = (int)a[1] - 48;C = (int)a[2] - 48;if (C > 4) {B = B + 1;if (B > 9) {A = A + 1;B = 0;if (A > 9) { A = 1; B = 0; i++; }}}printf("%d.%d*10^%lld\n", A, B, i - 1);return 0;}