結果
問題 | No.311 z in FizzBuzzString |
ユーザー | MaxMellon |
提出日時 | 2015-12-21 17:14:20 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,500 ms |
コード長 | 333 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 20,996 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-25 02:38:51 |
合計ジャッジ時間 | 719 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
4,348 KB |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | AC | 0 ms
4,348 KB |
testcase_03 | AC | 1 ms
4,348 KB |
testcase_04 | AC | 1 ms
4,348 KB |
testcase_05 | AC | 0 ms
4,348 KB |
testcase_06 | AC | 1 ms
4,348 KB |
testcase_07 | AC | 0 ms
4,348 KB |
testcase_08 | AC | 1 ms
4,348 KB |
testcase_09 | AC | 1 ms
4,348 KB |
testcase_10 | AC | 1 ms
4,348 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:14:3: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | fscanf(stdin, "%lu", &N); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int gcd(int a, int b) { if (a == 0) { return b; }; return gcd(b % a, a); } int lcm(int a, int b) { return a / gcd(a, b) * b; } int main(int argc, char const* argv[]) { unsigned long int N; fscanf(stdin, "%lu", &N); unsigned long int count = N / 3 + N / 5; printf("%lu\n", count * 2); return 0; }