結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-05 09:38:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 339 bytes |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 64,768 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 01:31:46 |
| 合計ジャッジ時間 | 1,533 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
#include<iostream>
using namespace std;
int main(){
int n, circles = 0;
cin >> n;
int length = to_string(n).length();
int A[10] = {1,0,0,0,1,0,1,0,2,1};
for(int i = 0; i < length; i++){
circles += A[n%10];
n /= 10;
}
int ans = length*2 + 1 + circles;
cout << ans << endl;
return 0;
}