結果
問題 | No.3022 縛りFizzBuzz (Easy) |
ユーザー | nomi |
提出日時 | 2018-02-21 17:22:55 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 3,517 bytes |
コンパイル時間 | 1,736 ms |
コンパイル使用メモリ | 181,528 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 12:30:56 |
合計ジャッジ時間 | 2,417 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,248 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; vector<string> a = { "a", "aa", "Fizz", "aaaa", "Buzz", "Fizz", "aaaaaaa", "aaaaaaaa", "Fizz", "Buzz", "aaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaa", "aaaaaaaaaaaaaa", "FizzBuzz", "aaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "Buzz", "aaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "FizzBuzz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "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", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Buzz", "Fizz", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Fizz", "Buzz", }; int main() { int n; cin >> n; a.resize(n); for (string s : a) { if (s.front() != 'a') { cout << s << endl; } else { cout << s.size() << endl; } } }