結果
問題 | No.593 4進FizzBuzz |
ユーザー |
|
提出日時 | 2017-11-13 02:20:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 494 ms |
コンパイル使用メモリ | 65,444 KB |
実行使用メモリ | 7,364 KB |
最終ジャッジ日時 | 2024-11-24 23:25:44 |
合計ジャッジ時間 | 2,947 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 31 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; string s;int a,b; main() { cin>>s; for(int i=0;i<s.size();i++) { int n=s[i]-'0'; a+=n; b=n-b; } if(a%3&&b%5)cout<<s<<endl; else cout<<(a%3?"":"Fizz")<<(b%5?"":"Buzz")<<endl; }