結果
問題 | No.668 6.0*10^23 |
ユーザー |
|
提出日時 | 2017-04-04 00:09:04 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 01:04:36 |
合計ジャッジ時間 | 1,560 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s",s); | ^~~~~~~~~~~~~
ソースコード
#include<stdio.h>#include<string.h>int main(void){int l,t3,a,b;char s[131072];scanf("%s",s);l = strlen(s);t3 = (s[0]-48)*100+(s[1]-48)*10+(s[2]-48)*1;if(995 <= t3){printf("1.0*10^%d\n",l);}else if(t3%10 <= 4){a = t3/100;b = (t3/10)%10;printf("%d.%d*10^%d\n",a,b,l-1);}else{t3+=10;a = t3/100;b = (t3/10)%10;printf("%d.%d*10^%d\n",a,b,l-1);}return 0;}