結果
問題 |
No.1486 ロボット
|
ユーザー |
![]() |
提出日時 | 2020-04-18 22:45:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-04 09:41:15 |
合計ジャッジ時間 | 3,549 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | -- * 17 |
ソースコード
#include <cstdio> using namespace std; int calc(int a, int b, int c, int d, int e) { int cnt = 0; int i; for (i = 0; i < e; i++) { if (i % (a + b) < a && i % (c + d) < c) { cnt++; } } return cnt; } int main() { int a, b, c, d, e; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); int lim = (a + b)*(c + d); int ans = calc(a, b, c, d, e); printf("%d\n", ans); return 0; }