結果

問題 No.250 atetubouのzetubou
ユーザー kongarishisyamo
提出日時 2016-05-06 15:52:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 55,004 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-05 10:08:02
合計ジャッジ時間 1,857 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

using namespace std;

int main(){

	int Q,D,X,T;

	cin>>Q;

	for(int i=0;i<Q;i++){
		cin>>D>>X>>T;
		int c=0;
		if(T==0) cout<<"ZETSUBOU"<<endl;
		else if(D==1) cout<<"AC"<<endl;
		else{
			while(D!=0&&X!=0){
				D--;
				int tmp=X+1;
				c+=tmp*(tmp+1)/2;
				X--;
			}
			if(c<=T) cout<<"AC"<<endl;
			else cout<<"ZETSUBOU"<<endl;
		}
	}

}
0