結果
| 問題 |
No.8043 yukicoderへようこそ!
|
| コンテスト | |
| ユーザー |
veqcc
|
| 提出日時 | 2019-04-01 22:46:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,347 bytes |
| コンパイル時間 | 1,282 ms |
| コンパイル使用メモリ | 106,788 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-27 03:43:34 |
| 合計ジャッジ時間 | 1,746 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 2 RE * 2 |
ソースコード
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <stack>
#include <set>
#include <map>
typedef long long ll;
using namespace std;
const ll MOD = 1000000007LL;
int main() {
cin.sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
if (s[0] - '0' > 9) {
cout << "Hello World!\n";
return 0;
}
int n = (int)stoi(s);
vector <ll> vec;
while (cin) {
cin >> s;
if (s[0] - '0' > 9) {
break;
}
vec.push_back((ll)stoi(s));
}
if (vec.size() == 0) {
for (int i = 1; i <= n; i++) {
if (i % 15 == 0) {
cout << "FizzBuzz\n";
} else if (i % 3 == 0) {
cout << "Fizz\n";
} else if (i % 5 == 0) {
cout << "Buzz\n";
} else {
cout << i << "\n";
}
}
} else if (vec.size() == 1) {
cout << n + vec[0] << " " << s << "\n";
} else {
ll ans = 0;
for (ll x : vec) ans += x;
cout << ans << "\n";
}
// cin >> n;
// ans = 0;
// for (int i = 1; i <= n; i++) ans += i;
// cout << ans << "\n";
return 0;
}
veqcc