結果
問題 |
No.668 6.0*10^23
|
ユーザー |
![]() |
提出日時 | 2018-03-23 22:50:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 429 ms |
コンパイル使用メモリ | 60,656 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 05:16:18 |
合計ジャッジ時間 | 1,500 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 WA * 16 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:17:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wformat=] 17 | printf("%.1f*10^%d",a,s.length()-1); | ~^ ~~~~~~~~~~~~ | | | | int std::__cxx11::basic_string<char>::size_type {aka long unsigned int} | %ld
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string s; cin >> s; float a = 0; for(int i = 0;i < 3;i++){ a *= 10; a += s[i] - '0'; } a/=100; printf("%.1f*10^%d",a,s.length()-1); return 0; }