結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-31 14:27:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 309 bytes |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 25,600 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 05:42:59 |
| 合計ジャッジ時間 | 1,340 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 40 WA * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",N);
| ~~~~~^~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char N[1000000]="";
scanf("%s",N);
int N10 = strlen(N)-1;
char head[4];
strncpy(head,N,3);
float Nhead = atoi(head)/100.;
if( Nhead>9.95 ) {
Nhead /= 10;
N10++;
}
printf("%.1f*10^%d\n",Nhead,N10);
return 0;
}