結果

問題 No.785 色食い虫
ユーザー ttttan
提出日時 2019-02-10 19:00:43
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 3,227 ms
コンパイル使用メモリ 158,604 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 20:34:20
合計ジャッジ時間 2,582 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s[3];cin>>s[0]>>s[1]>>s[2];
    int ans=1;
    for(int i=0;i<3;i++){
        if(s[i]=="NONE"){
            ans*=256;
            continue;
        }
        int cnt=0;
        for(int j=0;j<s[i].size();j++){
            if(s[i][j]!=',')cnt++;
        }
        cnt=16-cnt;
        ans*=cnt*cnt;
    }
    cout<<ans<<endl;
}
0