結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
|
提出日時 | 2020-07-02 03:25:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 1,730 ms |
コンパイル使用メモリ | 191,620 KB |
最終ジャッジ日時 | 2025-01-11 13:56:14 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int ds[10] = {4, 3, 3, 3, 4, 3, 4, 3, 5, 4}; int ret = 0; int c = 0; while (n) { ++c; ret += ds[n % 10]; n /= 10; } ret -= c-1; cout << ret << endl; return 0; }