結果

問題 No.593 4進FizzBuzz
ユーザー u_gf22
提出日時 2017-11-10 23:40:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 59,052 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-24 15:45:29
合計ジャッジ時間 3,349 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;

int four_Decimal(int deci) {
	int decimal=0;
	int d;
	int i = 0;
	while(deci!=0){
	
		d= deci % 10;
		decimal += d* (int)pow(4, i);
		i++;
		deci /= 10;
	}
	return decimal;
}
int main()
{
	int N;
	int a;
	cin >> N;
	a = four_Decimal(N);
	if (a % 15 == 0) cout << "FizzBuzz"<<endl;
	else if (a % 5 == 0)cout << "Buzz"<<endl;
	else if (a % 3 == 0)cout << "Fizz"<<endl;
	else cout << N<<endl;
	
    return 0;
}
0