結果
| 問題 |
No.668 6.0*10^23
|
| コンテスト | |
| ユーザー |
kanpurin002
|
| 提出日時 | 2018-11-14 00:31:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 297 bytes |
| コンパイル時間 | 252 ms |
| コンパイル使用メモリ | 22,912 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 05:09:33 |
| 合計ジャッジ時間 | 1,612 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s",str);
| ~~~~~^~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(){
int a,b,c,m;
char str[100001];
scanf("%s",str);
m=100*(str[0]-'0')+10*(str[1]-'0')+str[2]-'0';
m=(m+5)/10;
a=m/10==10?1:m/10;
b=m%10;
c=(str[0]=='9'&&a==1)?strlen(str):strlen(str)-1;
printf("%d.%d*10^%d",a,b,c);
return 0;
}
kanpurin002