結果
| 問題 |
No.593 4進FizzBuzz
|
| コンテスト | |
| ユーザー |
Kutimoti_T
|
| 提出日時 | 2018-06-07 17:44:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 1,433 ms |
| コンパイル使用メモリ | 160,248 KB |
| 実行使用メモリ | 7,312 KB |
| 最終ジャッジ日時 | 2024-06-30 10:33:00 |
| 合計ジャッジ時間 | 4,641 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 7 WA * 24 |
ソースコード
#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