結果
問題 | No.637 X: Yet Another FizzBuzz Problem |
ユーザー |
![]() |
提出日時 | 2019-07-07 01:02:33 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 29,440 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 21:04:37 |
合計ジャッジ時間 | 1,202 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
#include<stdio.h> int main() { int i; int a[5]; for (i = 0; i < 5; i++) scanf("%d", &a[i]); int ans = 0; for (i = 0; i < 5; i++) { if (a[i] % 15 == 0) ans += 8; else if (a[i] % 3 == 0 || a[i] % 5 == 0) ans += 4; else { while (a[i] > 0) { ans++; a[i] /= 10; } } } printf("%d\n", ans); return 0; }