結果
| 問題 |
No.593 4進FizzBuzz
|
| コンテスト | |
| ユーザー |
Kutimoti_T
|
| 提出日時 | 2018-06-07 17:46:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 364 bytes |
| コンパイル時間 | 1,235 ms |
| コンパイル使用メモリ | 161,792 KB |
| 実行使用メモリ | 8,992 KB |
| 最終ジャッジ日時 | 2024-06-30 10:33:10 |
| 合計ジャッジ時間 | 3,642 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 12 WA * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
int main(){
string s;
cin >> s;
i64 N = 0;
for(char c : s){
int num = c - '0';
N *= 4;
N += num;
}
string ans[] = {to_string(N),"Fizz","Buzz","FizzBuzz"};
cout << ans[(N % 3 == 0) | ((N % 5 == 0) << 1)] << endl;
}
Kutimoti_T