結果
| 問題 | No.668 6.0*10^23 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-27 18:00:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 263 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 23:12:45 |
| 合計ジャッジ時間 | 1,339 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 44 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:4:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d", &N);
| ~~~~~^~~~~~~~~~
ソースコード
#include<cstdio>
int main(void) {
int N, a, b, i;
scanf("%d", &N);
for (i = 0; N > 999; i++) {
N = N / 10;
}
N = N + 5;
if (N > 999) {
N = N / 10;
i++;
}
a = N / 100;
N = N - a * 100;
b = N / 10;
printf("%d.%d*10^%d\n", a, b, i + 2);
return 0;
}