結果

問題 No.785 色食い虫
ユーザー wacchoz
提出日時 2019-02-22 23:18:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 526 bytes
コンパイル時間 1,277 ms
コンパイル使用メモリ 160,200 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 22:16:46
合計ジャッジ時間 2,372 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;

typedef pair<int, int> P;
#define int long long
#define ll long long
#define mod 1000000007
#define INF (1LL<<60)

#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

signed main(){

	int ans = 1;
	for (int i = 0; i < 3; i++){
		string s;
		cin >> s;
		if (s == "NONE"){
			ans *= 16 * 16;
			continue;
		}
		int cnt = 0;
		for (int j = 0; j < s.length(); j++)
			if (s[j] == ',') cnt++;

		cnt++;
		ans *= (16 - cnt) * (16 - cnt);
	}
	cout << ans << endl;

	return 0;
}
0