Submission #00121
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include<stdio.h> signed main(){ long long n,b,i,z=0,a=998244353; char c[1]; scanf ( "%lld" ,&n); for (i=0;i<n;i++){ scanf ( "%s %lld" ,c,&b); if (b!=0){ b=b%a; } if (b<0){ b +=a; } if (c[0]== '+' ){ z=z+b; } if (c[0]== '-' ){ z=z-b; } if (c[0]== '*' ){ z=z*b; } if (z!=0){ z %=a; } if (z<0){ z +=a; } } printf ( "%lld\n" ,z); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - Modulo Calculation |
ユーザー名 | ei2037 |
投稿日時 | 2020-07-14 17:53:01 |
言語 | C |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 596 Byte |
最大実行時間 | 97 ms |
最大メモリ使用量 | 600 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 50 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input01 | AC | 32 ms | 376 KB |
1
|
input02 | WA | 16 ms | 312 KB |
1
|
input03 | WA | 42 ms | 328 KB |
1
|
input04 | WA | 23 ms | 376 KB |
1
|
input05 | WA | 55 ms | 548 KB |
1
|
input06 | WA | 23 ms | 380 KB |
1
|
input07 | WA | 45 ms | 388 KB |
1
|
input08 | WA | 19 ms | 436 KB |
1
|
input09 | WA | 35 ms | 488 KB |
1
|
input10 | WA | 29 ms | 444 KB |
1
|
input11 | WA | 49 ms | 464 KB |
1
|
input12 | WA | 19 ms | 388 KB |
1
|
input13 | WA | 85 ms | 572 KB |
1
|
input14 | WA | 16 ms | 524 KB |
1
|
input15 | WA | 22 ms | 548 KB |
1
|
input16 | AC | 54 ms | 500 KB |
1
|
input17 | WA | 77 ms | 432 KB |
1
|
input18 | WA | 23 ms | 576 KB |
1
|
input19 | WA | 59 ms | 408 KB |
1
|
input20 | WA | 29 ms | 428 KB |
1
|
input21 | WA | 67 ms | 516 KB |
1
|
input22 | WA | 71 ms | 536 KB |
1
|
input23 | WA | 62 ms | 584 KB |
1
|
input24 | WA | 79 ms | 536 KB |
1
|
input25 | WA | 46 ms | 564 KB |
1
|
input26 | WA | 38 ms | 520 KB |
1
|
input27 | WA | 52 ms | 452 KB |
1
|
input28 | WA | 19 ms | 600 KB |
1
|
input29 | WA | 61 ms | 556 KB |
1
|
input30 | WA | 33 ms | 472 KB |
1
|
input31 | WA | 82 ms | 396 KB |
1
|
input32 | WA | 77 ms | 448 KB |
1
|
input33 | WA | 22 ms | 476 KB |
1
|
input34 | WA | 33 ms | 524 KB |
1
|
input35 | WA | 22 ms | 576 KB |
1
|
input36 | WA | 22 ms | 500 KB |
1
|
input37 | WA | 88 ms | 456 KB |
1
|
input38 | WA | 87 ms | 484 KB |
1
|
input39 | WA | 88 ms | 540 KB |
1
|
input40 | WA | 97 ms | 592 KB |
1
|
input_sample01 | WA | 23 ms | 516 KB |
1
|
input_sample02 | WA | 13 ms | 476 KB |
1
|