結果
| 問題 |
No.509 塗りつぶしツール
|
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2017-04-28 23:11:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 368 bytes |
| コンパイル時間 | 1,568 ms |
| コンパイル使用メモリ | 169,632 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 18:31:00 |
| 合計ジャッジ時間 | 2,374 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 16 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int)N;i++)
#define p(s) cout<<(s)<<endl
using namespace std;
const int inf=1e9;
int main(){
map<char,int> m;
string s;
cin>>s;
int ans=1;
REP(i,0,s.size()){
char c=s[i];
if(c=='0'||c=='4'||c=='6'||c=='9'){
ans+=3;
}else if(c=='8'){
ans+=4;
}else{
ans+=2;
}
}
p(ans);
return 0;
}
dnish