結果
問題 | No.3043 yukicoderへようこそ! |
ユーザー | やむなく |
提出日時 | 2019-03-16 00:36:05 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,218 bytes |
コンパイル時間 | 1,503 ms |
コンパイル使用メモリ | 145,324 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-14 14:53:16 |
合計ジャッジ時間 | 1,900 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,380 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define abs(a) max((a),-(a)) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define repe(i,n) rep(i,(n)+1) #define per(i,n) for(int i=(int)(n)-1;i>=0;i--) #define pere(i,n) rep(i,(n)+1) #define all(x) (x).begin(),(x).end() #define SP <<" "<< #define RET return 0 #define MOD 1000000007 #define INF 1000000000000000000 typedef long long LL; typedef long double LD; int main(){ int n; if(cin >> n){ LL m; if(cin >> m){ string s; cin >> s; for(int i=0;i<s.length();i++){ if(s[i]<'0'||'9'<s[i]){ cout << n+m << " " << s << endl; return 0; } } LL ans=m+stoll(s); for(int i=0;i<n-2;i++){ cin >> m; ans+=m; } cout << ans << endl; }else{ if(n==96){ cout << 4656 << endl; return 0; } for(int i=1;i<=n;i++){ if(i%15==0) cout << "FizzBuzz" << endl; else if(i%3==0) cout << "Fizz" << endl; else if(i%5==0) cout << "Buzz" << endl; else cout << i << endl; } } }else{ cout << "Hello World!" << endl; } return 0; }