結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー okkuukenken
提出日時 2022-06-01 16:16:19
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 235 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 79,104 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-21 01:36:06
合計ジャッジ時間 2,106 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;
int main(){
	int a,ans=0;
	while(cin>>a){
		int tmp=0;
		if(a%3==0)
			tmp+=4;
		if(a%5==0)
			tmp+=4;
		if(tmp==0)
			tmp=to_string(a).size();
		ans+=tmp;
	}
	cout<<ans<<endl;
}
0