結果
| 問題 | No.671 1000000007 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-20 21:04:04 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 210 bytes |
| 記録 | |
| コンパイル時間 | 985 ms |
| コンパイル使用メモリ | 174,988 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-21 00:33:42 |
| 合計ジャッジ時間 | 1,492 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:11:21: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
11 | cout<<abs(ans-11)<<endl;
| ^
main.cpp:4:15: note: 'ans' was declared here
4 | long long ans,a,i,n;
| ^~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
long long ans,a,i,n;
cin>>n;
a=1;
for(i=1;i-20;++i){
if(!(n/a)){ans=i;break;}
a*=10;
}
cout<<abs(ans-11)<<endl;
}