結果
| 問題 |
No.593 4進FizzBuzz
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-10 22:40:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 604 bytes |
| コンパイル時間 | 1,426 ms |
| コンパイル使用メモリ | 168,304 KB |
| 実行使用メモリ | 9,248 KB |
| 最終ジャッジ日時 | 2024-11-24 12:56:54 |
| 合計ジャッジ時間 | 4,945 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 13 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
#define pq priotity_queue
#define P pair<int,int>
#define P2 pair<int,P>
#define P3 pair<int,P2>
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,-1,0,-1,1,0,0};
const ld PI=abs(acos(-1));
int n,li[200010]={};
string s;
int main(){
cin >> s;
ll pos=0;
REP(i,0,s.size()) pos+=(s[i]-'0')*pow(4,i);
if(pos%3 and pos%5) cout << s;
if(!(pos%3)) cout << "Fizz";
if(!(pos%5)) cout << "Buzz";
cout << endl;
return 0;
}