結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-04-28 22:38:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 627 bytes |
コンパイル時間 | 1,640 ms |
コンパイル使用メモリ | 167,616 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 18:09:38 |
合計ジャッジ時間 | 2,524 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
ソースコード
#include "bits/stdc++.h" using namespace std; #define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--) #define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end()) #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL 0x3f3f3f3f3f3f3f3fLL typedef long long ll; int main() { string s; cin >> s; int ans = 1; REP(i,s.size()) { char t = s[i] - '0'; if(t==1||t==2||t==3||t==5||t==7) ans += 2; if(t==0||t==4||t==6||t==9) ans += 3; if(t==8) ans += 4; } cout << ans << endl; return 0; }