結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー ohreitetsuohreitetsu
提出日時 2018-06-04 23:17:02
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 594 bytes
コンパイル時間 480 ms
コンパイル使用メモリ 63,492 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-12 22:18:42
合計ジャッジ時間 1,995 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 WA -
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 WA -
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 2 ms
4,380 KB
testcase_32 WA -
testcase_33 AC 2 ms
4,376 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
	LL N,a,b,c;
	cin>>N;
	cin>>a>>b>>c;
	if (c%b==0 || c%a==0){
		c=0;
	}
	if (b%a==0){
		b=0;
	}

	LL a1=0,b1=0,c1=0,d1=0,e1=0,f1=0,g1=0;
	a1=N/a;
	if (b>0){
		b1=N/b;
	}
	if (c>0){
		c1=N/c;
	}
	if (b>0){
		d1=N/(a*b);
	}
	if (c>0){
		LL x=a*c;
		f1=N/(a*c);

	}
	if (b>0 &&c>0){
		LL x=b*c;
		e1=N/(b*c);
		g1=N/(a*b*c);
	}
	/*
	cout<<a1<<endl;
	cout<<a1+b1<<endl;
	cout<<a1+b1+c1<<endl;
	cout<<a1+b1+c1-d1<<endl;
	cout<<a1+b1+c1-d1-e1<<endl;
	*/
	cout<<a1+b1+c1-d1-e1-f1+g1<<endl;
	
	return 0;
}
0