結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
impedance_BS
|
| 提出日時 | 2017-04-28 23:05:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 405 ms |
| コンパイル使用メモリ | 55,520 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 18:30:01 |
| 合計ジャッジ時間 | 1,309 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
#include <iostream>
#include <string>
int main(void){
using namespace std;
int data[10] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
string str;
cin >> str;
unsigned long long int ans = 0;
for(int i = 0; i < str.size(); ++i){
ans += data[str[i] - '0'] + 3;
}
int len = str.size() - 1;
ans -= len;
cout << ans << endl;
return 0;
}
// 0, 4, 6, 9 -> 4
// 1, 2, 3, 5, 7 -> 3
// 8 ->
// 数字を赤に
// 背景を黒に
// 上の穴を黒に
// 下の穴を黒に
// 数字を白に
// よって、5回
// 1046928
// 3+4+4+4+4+3+5=7+8+7+5=15+12=27
impedance_BS