結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
algon_320
|
| 提出日時 | 2017-03-31 22:33:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 607 bytes |
| コンパイル時間 | 1,689 ms |
| コンパイル使用メモリ | 167,500 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 04:56:10 |
| 合計ジャッジ時間 | 2,011 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
string zero="";
string one="#";
string two="##";
string three="###";
string five="#####";
for(int i=one.size();i<N+one.size();i++) {
if(i%three.size()==zero.size() && i%five.size()==zero.size()) {
cout<<"FizzBuzz"<<endl;
}
else if(i%three.size()==zero.size()) {
cout<<"Fizz"<<endl;
}
else if(i%five.size()==zero.size()) {
cout<<"Buzz"<<endl;
}
else {
cout<<i<<endl;
}
}
return 0;
}
algon_320