結果
| 問題 | No.8022 縛りFizzBuzz (Easy) |
| コンテスト | |
| ユーザー |
shiroha_F14
|
| 提出日時 | 2021-03-03 23:30:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 483 bytes |
| 記録 | |
| コンパイル時間 | 455 ms |
| コンパイル使用メモリ | 67,328 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-03 14:40:41 |
| 合計ジャッジ時間 | 1,052 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int i; cin >> i;
int t = (int)true + (int)true + (int)true;
int f = (int)true + (int)true + (int)true + (int)true + (int)true;
int counter = (int)true;
while(counter <= i){
string ans = "";
if(!(counter % t)) ans += "Fizz";
if(!(counter % f)) ans += "Buzz";
if(ans == ""){ans = to_string(counter);}
cout << ans << endl;
counter++;
}
return (int)false;
}
shiroha_F14