結果
問題 |
No.604 誕生日のお小遣い
|
ユーザー |
![]() |
提出日時 | 2017-12-08 14:24:25 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 484 ms |
コンパイル使用メモリ | 65,164 KB |
最終ジャッジ日時 | 2025-01-05 04:58:20 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | AC * 16 TLE * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%lld %lld %lld", &a, &b, &c); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> class Yuki { public: long long int old; long long int sum; }; int main(void) { long long int a, b, c; scanf("%lld %lld %lld", &a, &b, &c); Yuki yuki; yuki.sum=0; yuki.old = 1; while(1) { if(yuki.old % a != 0){ yuki.sum++; } else { yuki.sum += b; } if(yuki.sum >= c){ break; } yuki.old++; } printf("%lld\n", yuki.old); return 0; }