結果
問題 |
No.668 6.0*10^23
|
ユーザー |
|
提出日時 | 2018-07-04 17:37:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 02:14:31 |
合計ジャッジ時間 | 1,675 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 47 WA * 3 |
コンパイルメッセージ
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; if (A > 9) { A = 1; B = 0; i++; } } } printf("%d.%d*10^%lld\n", A, B, i - 1); return 0; }