結果
問題 | No.81 すべて足すだけの簡単なお仕事です。 |
ユーザー |
![]() |
提出日時 | 2016-09-11 16:00:31 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 999 bytes |
コンパイル時間 | 640 ms |
コンパイル使用メモリ | 31,744 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 03:27:07 |
合計ジャッジ時間 | 1,781 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 21 |
ソースコード
program mainimplicit noneinteger*8::N,i,dot,len,borrow,carryinteger*8::big,small,big_t,small_tinteger*8,parameter::keta=10000000000_8character*22::inputdata big_t,small_t/2*0/read *,Ndo i=1,Nread *,inputlen = LEN_TRIM(input)dot = SCAN(input,'.')if(dot.ne.0) thenread (input(1:dot-1),*) bigread (input(dot+1:len),*) smallsmall = 10**(10-len+dot)*smallelseread (input(1:len),*) bigsmall = 0end ifbig_t = big_t + bigif(input(1:1).eq.'-') thensmall_t = small_t - smallelsesmall_t = small_t + smallend if! print '(i0," ",i0," ",i0," ",i0)',big,small,big_t,small_tend doif(small_t.ge.0) thencarry = small_t/ketabig_t = big_t + carrysmall_t = MOD(small_t,keta)elseborrow = small_t/keta+1big_t = big_t - borrowsmall_t = borrow*keta - small_tend ifprint '(i0,".",i10.10)',big_t,small_tend program main